diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 6eb2a378..103ab9a9 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1667,6 +1667,7 @@ Standard ML: - sml primary_extension: .sml extensions: + - .ML - .fun Stylus: diff --git a/lib/linguist/samples.json b/lib/linguist/samples.json index 6d26388a..35ce56ba 100644 --- a/lib/linguist/samples.json +++ b/lib/linguist/samples.json @@ -237,6 +237,9 @@ "Markdown": [ ".md" ], + "Mask": [ + ".mask" + ], "Matlab": [ ".m" ], @@ -417,6 +420,9 @@ ".sh", ".zsh" ], + "Shen": [ + ".shen" + ], "Slash": [ ".sl" ], @@ -424,6 +430,7 @@ ".nut" ], "Standard ML": [ + ".ML", ".fun", ".sig", ".sml" @@ -488,6 +495,9 @@ ], "Xtend": [ ".xtend" + ], + "YAML": [ + ".yml" ] }, "interpreters": { @@ -551,8 +561,8 @@ ".gemrc" ] }, - "tokens_total": 450556, - "languages_total": 548, + "tokens_total": 454311, + "languages_total": 554, "tokens": { "ABAP": { "*/**": 1, @@ -30365,6 +30375,55 @@ "Markdown": { "Tender": 1 }, + "Mask": { + "header": 1, + "{": 10, + "img": 1, + ".logo": 1, + "src": 1, + "alt": 1, + "logo": 1, + ";": 3, + "h4": 1, + "if": 1, + "(": 3, + "currentUser": 1, + ")": 3, + ".account": 1, + "a": 1, + "href": 1, + "}": 10, + ".view": 1, + "ul": 1, + "for": 1, + "user": 1, + "index": 1, + "of": 1, + "users": 1, + "li.user": 1, + "data": 1, + "-": 3, + "id": 1, + ".name": 1, + ".count": 1, + ".date": 1, + "countdownComponent": 1, + "input": 1, + "type": 1, + "text": 1, + "dualbind": 1, + "value": 1, + "button": 1, + "x": 2, + "signal": 1, + "h5": 1, + "animation": 1, + "slot": 1, + "@model": 1, + "@next": 1, + "footer": 1, + "bazCompo": 1 + }, "Matlab": { "function": 34, "[": 311, @@ -44077,6 +44136,440 @@ "foodforthought.jpg": 1, "name##*fo": 1 }, + "Shen": { + "*": 47, + "graph.shen": 1, + "-": 747, + "a": 30, + "library": 3, + "for": 12, + "graph": 52, + "definition": 1, + "and": 16, + "manipulation": 1, + "Copyright": 2, + "(": 267, + "C": 6, + ")": 250, + "Eric": 2, + "Schulte": 2, + "***": 5, + "License": 2, + "Redistribution": 2, + "use": 2, + "in": 13, + "source": 4, + "binary": 4, + "forms": 2, + "with": 8, + "or": 2, + "without": 2, + "modification": 2, + "are": 7, + "permitted": 2, + "provided": 4, + "that": 3, + "the": 29, + "following": 6, + "conditions": 6, + "met": 2, + "Redistributions": 4, + "of": 20, + "code": 2, + "must": 4, + "retain": 2, + "above": 4, + "copyright": 4, + "notice": 4, + "this": 4, + "list": 32, + "disclaimer.": 2, + "form": 2, + "reproduce": 2, + "disclaimer": 2, + "documentation": 2, + "and/or": 2, + "other": 2, + "materials": 2, + "distribution.": 2, + "THIS": 4, + "SOFTWARE": 4, + "IS": 2, + "PROVIDED": 2, + "BY": 2, + "THE": 10, + "COPYRIGHT": 4, + "HOLDERS": 2, + "AND": 8, + "CONTRIBUTORS": 4, + "ANY": 8, + "EXPRESS": 2, + "OR": 16, + "IMPLIED": 4, + "WARRANTIES": 4, + "INCLUDING": 6, + "BUT": 4, + "NOT": 4, + "LIMITED": 4, + "TO": 4, + "OF": 16, + "MERCHANTABILITY": 2, + "FITNESS": 2, + "FOR": 4, + "A": 32, + "PARTICULAR": 2, + "PURPOSE": 2, + "ARE": 2, + "DISCLAIMED.": 2, + "IN": 6, + "NO": 2, + "EVENT": 2, + "SHALL": 2, + "HOLDER": 2, + "BE": 2, + "LIABLE": 2, + "DIRECT": 2, + "INDIRECT": 2, + "INCIDENTAL": 2, + "SPECIAL": 2, + "EXEMPLARY": 2, + "CONSEQUENTIAL": 2, + "DAMAGES": 2, + "PROCUREMENT": 2, + "SUBSTITUTE": 2, + "GOODS": 2, + "SERVICES": 2, + ";": 12, + "LOSS": 2, + "USE": 4, + "DATA": 2, + "PROFITS": 2, + "BUSINESS": 2, + "INTERRUPTION": 2, + "HOWEVER": 2, + "CAUSED": 2, + "ON": 2, + "THEORY": 2, + "LIABILITY": 4, + "WHETHER": 2, + "CONTRACT": 2, + "STRICT": 2, + "TORT": 2, + "NEGLIGENCE": 2, + "OTHERWISE": 2, + "ARISING": 2, + "WAY": 2, + "OUT": 2, + "EVEN": 2, + "IF": 2, + "ADVISED": 2, + "POSSIBILITY": 2, + "SUCH": 2, + "DAMAGE.": 2, + "Commentary": 2, + "Graphs": 1, + "represented": 1, + "as": 2, + "two": 1, + "dictionaries": 1, + "one": 2, + "vertices": 17, + "edges.": 1, + "It": 1, + "is": 5, + "important": 1, + "to": 16, + "note": 1, + "dictionary": 3, + "implementation": 1, + "used": 2, + "able": 1, + "accept": 1, + "arbitrary": 1, + "data": 17, + "structures": 1, + "keys.": 1, + "This": 1, + "structure": 2, + "technically": 1, + "encodes": 1, + "hypergraphs": 1, + "generalization": 1, + "graphs": 1, + "which": 1, + "each": 1, + "edge": 32, + "may": 1, + "contain": 2, + "any": 1, + "number": 12, + ".": 1, + "Examples": 1, + "regular": 1, + "G": 25, + "hypergraph": 1, + "H": 3, + "corresponding": 1, + "given": 4, + "below.": 1, + "": 3, + "Vertices": 11, + "Edges": 9, + "+": 33, + "Graph": 65, + "hash": 8, + "|": 103, + "key": 9, + "value": 17, + "b": 13, + "c": 11, + "g": 19, + "[": 93, + "]": 91, + "d": 12, + "e": 14, + "f": 10, + "Hypergraph": 1, + "h": 3, + "i": 3, + "j": 2, + "associated": 1, + "edge/vertex": 1, + "@p": 17, + "V": 48, + "#": 4, + "E": 20, + "edges": 17, + "M": 4, + "vertex": 29, + "associations": 1, + "size": 2, + "all": 3, + "stored": 1, + "dict": 39, + "sizeof": 4, + "int": 1, + "indices": 1, + "into": 1, + "&": 1, + "Edge": 11, + "dicts": 3, + "entry": 2, + "storage": 2, + "Vertex": 3, + "Code": 1, + "require": 2, + "sequence": 2, + "datatype": 1, + "dictoinary": 1, + "vector": 4, + "symbol": 1, + "package": 2, + "add": 25, + "has": 5, + "neighbors": 8, + "connected": 21, + "components": 8, + "partition": 7, + "bipartite": 3, + "included": 2, + "from": 3, + "take": 2, + "drop": 2, + "while": 2, + "range": 1, + "flatten": 1, + "filter": 2, + "complement": 1, + "seperate": 1, + "zip": 1, + "indexed": 1, + "reduce": 3, + "mapcon": 3, + "unique": 3, + "frequencies": 1, + "shuffle": 1, + "pick": 1, + "remove": 2, + "first": 2, + "interpose": 1, + "subset": 3, + "cartesian": 1, + "product": 1, + "<-dict>": 5, + "contents": 1, + "keys": 3, + "vals": 1, + "make": 10, + "define": 34, + "X": 4, + "<-address>": 5, + "0": 1, + "create": 1, + "specified": 1, + "sizes": 2, + "}": 22, + "Vertsize": 2, + "Edgesize": 2, + "let": 9, + "absvector": 1, + "do": 8, + "address": 5, + "defmacro": 3, + "macro": 3, + "return": 4, + "taking": 1, + "optional": 1, + "N": 7, + "vert": 12, + "1": 1, + "2": 3, + "{": 15, + "get": 3, + "Value": 3, + "if": 8, + "tuple": 3, + "fst": 3, + "error": 7, + "string": 3, + "resolve": 6, + "Vector": 2, + "Index": 2, + "Place": 6, + "nth": 1, + "<-vector>": 2, + "Vert": 5, + "Val": 5, + "trap": 4, + "snd": 2, + "map": 5, + "lambda": 1, + "w": 4, + "B": 2, + "Data": 2, + "w/o": 5, + "D": 4, + "update": 5, + "an": 3, + "s": 1, + "Vs": 4, + "Store": 6, + "<": 4, + "limit": 2, + "VertLst": 2, + "/.": 4, + "Contents": 5, + "adjoin": 2, + "length": 5, + "EdgeID": 3, + "EdgeLst": 2, + "p": 1, + "boolean": 4, + "Return": 1, + "Already": 5, + "New": 5, + "Reachable": 2, + "difference": 3, + "append": 1, + "including": 1, + "itself": 1, + "fully": 1, + "Acc": 2, + "true": 1, + "_": 1, + "VS": 4, + "Component": 6, + "ES": 3, + "Con": 8, + "verts": 4, + "cons": 1, + "place": 3, + "partitions": 1, + "element": 2, + "simple": 3, + "CS": 3, + "Neighbors": 3, + "empty": 1, + "intersection": 1, + "check": 1, + "tests": 1, + "set": 1, + "chris": 6, + "patton": 2, + "eric": 1, + "nobody": 2, + "fail": 1, + "when": 1, + "wrapper": 1, + "function": 1, + "html.shen": 1, + "html": 2, + "generation": 1, + "functions": 1, + "shen": 1, + "The": 1, + "standard": 1, + "lisp": 1, + "conversion": 1, + "tool": 1, + "suite.": 1, + "Follows": 1, + "some": 1, + "convertions": 1, + "Clojure": 1, + "tasks": 1, + "stuff": 1, + "todo1": 1, + "today": 1, + "attributes": 1, + "AS": 1, + "load": 1, + "JSON": 1, + "Lexer": 1, + "Read": 1, + "stream": 1, + "characters": 4, + "Whitespace": 4, + "not": 1, + "strings": 2, + "should": 2, + "be": 2, + "discarded.": 1, + "preserved": 1, + "Strings": 1, + "can": 1, + "escaped": 1, + "double": 1, + "quotes.": 1, + "e.g.": 2, + "whitespacep": 2, + "ASCII": 2, + "Space.": 1, + "All": 1, + "others": 1, + "whitespace": 7, + "table.": 1, + "Char": 4, + "member": 1, + "replace": 3, + "@s": 4, + "Suffix": 4, + "where": 2, + "Prefix": 2, + "fetch": 1, + "until": 1, + "unescaped": 1, + "doublequote": 1, + "c#34": 5, + "WhitespaceChar": 2, + "Chars": 4, + "strip": 2, + "chars": 2, + "tokenise": 1, + "JSONString": 2, + "CharList": 2, + "explode": 1 + }, "Slash": { "<%>": 1, "class": 11, @@ -44203,67 +44696,67 @@ "newplayer.MoveTo": 1 }, "Standard ML": { + "structure": 15, + "LazyBase": 4, + "LAZY_BASE": 5, + "struct": 13, + "type": 6, + "a": 78, + "exception": 2, + "Undefined": 6, + "fun": 60, + "delay": 6, + "f": 46, + "force": 18, + "(": 840, + ")": 845, + "val": 147, + "undefined": 2, + "fn": 127, + "raise": 6, + "end": 55, + "LazyMemoBase": 4, + "datatype": 29, + "|": 226, + "Done": 2, + "of": 91, + "lazy": 13, + "unit": 7, + "-": 20, + "let": 44, + "open": 9, + "B": 2, + "inject": 5, + "x": 74, + "isUndefined": 4, + "ignore": 3, + ";": 21, + "false": 32, + "handle": 4, + "true": 36, + "toString": 4, + "if": 51, + "then": 51, + "else": 51, + "eqBy": 5, + "p": 10, + "y": 50, + "eq": 3, + "op": 2, + "compare": 8, + "Ops": 3, + "map": 3, + "Lazy": 2, + "LazyFn": 4, + "LazyMemo": 2, "signature": 2, - "LAZY_BASE": 3, "sig": 2, - "type": 5, - "a": 74, - "lazy": 12, - "-": 19, - ")": 826, - "end": 52, "LAZY": 1, "bool": 9, - "val": 143, - "inject": 3, - "toString": 3, - "(": 822, "string": 14, - "eq": 2, "*": 9, - "eqBy": 3, - "compare": 7, "order": 2, - "map": 2, "b": 58, - "structure": 10, - "Ops": 2, - "LazyBase": 2, - "struct": 9, - "exception": 1, - "Undefined": 3, - "fun": 51, - "delay": 3, - "f": 37, - "force": 9, - "undefined": 1, - "fn": 124, - "raise": 5, - "LazyMemoBase": 2, - "datatype": 28, - "|": 225, - "Done": 1, - "of": 90, - "unit": 6, - "let": 43, - "open": 8, - "B": 1, - "x": 59, - "isUndefined": 2, - "ignore": 2, - ";": 20, - "false": 31, - "handle": 3, - "true": 35, - "if": 50, - "then": 50, - "else": 50, - "p": 6, - "y": 44, - "op": 1, - "Lazy": 1, - "LazyFn": 2, - "LazyMemo": 1, "functor": 2, "Main": 1, "S": 2, @@ -48459,7 +48952,7 @@ }, "YAML": { "gem": 1, - "-": 16, + "-": 25, "local": 1, "gen": 1, "rdoc": 2, @@ -48471,7 +48964,40 @@ "numbers": 1, "gempath": 1, "/usr/local/rubygems": 1, - "/home/gavin/.rubygems": 1 + "/home/gavin/.rubygems": 1, + "http_interactions": 1, + "request": 1, + "method": 1, + "get": 1, + "uri": 1, + "http": 1, + "//example.com/": 1, + "body": 3, + "headers": 2, + "{": 1, + "}": 1, + "response": 2, + "status": 1, + "code": 1, + "message": 1, + "OK": 1, + "Content": 2, + "Type": 1, + "text/html": 1, + ";": 1, + "charset": 1, + "utf": 1, + "Length": 1, + "This": 1, + "is": 1, + "the": 1, + "http_version": 1, + "recorded_at": 1, + "Tue": 1, + "Nov": 1, + "GMT": 1, + "recorded_with": 1, + "VCR": 1 } }, "language_tokens": { @@ -48544,6 +49070,7 @@ "M": 23373, "Makefile": 50, "Markdown": 1, + "Mask": 74, "Matlab": 11942, "Max": 714, "MediaWiki": 766, @@ -48594,9 +49121,10 @@ "Scilab": 69, "SCSS": 39, "Shell": 3744, + "Shen": 3472, "Slash": 187, "Squirrel": 130, - "Standard ML": 6405, + "Standard ML": 6567, "Stylus": 76, "SuperCollider": 133, "Tea": 3, @@ -48617,7 +49145,7 @@ "XQuery": 801, "XSLT": 44, "Xtend": 399, - "YAML": 30 + "YAML": 77 }, "languages": { "ABAP": 1, @@ -48689,6 +49217,7 @@ "M": 28, "Makefile": 2, "Markdown": 1, + "Mask": 1, "Matlab": 39, "Max": 3, "MediaWiki": 1, @@ -48739,9 +49268,10 @@ "Scilab": 3, "SCSS": 1, "Shell": 37, + "Shen": 3, "Slash": 1, "Squirrel": 1, - "Standard ML": 4, + "Standard ML": 5, "Stylus": 1, "SuperCollider": 1, "Tea": 1, @@ -48762,7 +49292,7 @@ "XQuery": 1, "XSLT": 1, "Xtend": 2, - "YAML": 1 + "YAML": 2 }, - "md5": "cfe1841f5e4b2ab14a1ad53ad64523b8" + "md5": "4508fdb043a1f43e9a2250f9b4216e5a" } \ No newline at end of file diff --git a/samples/Standard ML/Foo.ML b/samples/Standard ML/Foo.ML new file mode 100644 index 00000000..2bbb789e --- /dev/null +++ b/samples/Standard ML/Foo.ML @@ -0,0 +1,75 @@ + +structure LazyBase:> LAZY_BASE = + struct + type 'a lazy = unit -> 'a + + exception Undefined + + fun delay f = f + + fun force f = f() + + val undefined = fn () => raise Undefined + end + +structure LazyMemoBase:> LAZY_BASE = + struct + + datatype 'a susp = NotYet of unit -> 'a + | Done of 'a + + type 'a lazy = unit -> 'a susp ref + + exception Undefined + + fun delay f = + let + val r = ref (NotYet f) + in + fn () => r + end + + fun force f = + case f() of + ref (Done x) => x + | r as ref (NotYet f') => + let + val a = f'() + in + r := Done a + ; a + end + + val undefined = fn () => raise Undefined + end + +functor LazyFn(B: LAZY_BASE): LAZY' = + struct + + open B + + fun inject x = delay (fn () => x) + + fun isUndefined x = + (ignore (force x) + ; false) + handle Undefined => true + + fun toString f x = if isUndefined x then "_|_" else f (force x) + + fun eqBy p (x,y) = p(force x,force y) + fun eq (x,y) = eqBy op= (x,y) + fun compare p (x,y) = p(force x,force y) + + structure Ops = + struct + val ! = force + val ? = inject + end + + fun map f x = delay (fn () => f (force x)) + + end + +structure Lazy' = LazyFn(LazyBase) +structure LazyMemo = LazyFn(LazyMemoBase)