const lang = Object.freeze({ "displayName": "Haskell", "fileTypes": ["hs", "hs-boot", "hsig"], "name": "haskell", "patterns": [{ "include": "#liquid_haskell" }, { "include": "#comment_like" }, { "include": "#numeric_literals" }, { "include": "#string_literal" }, { "include": "#char_literal" }, { "match": "(?\n \\( # Opening parenthesis\n (?:\n [^\\(\\)]* # Match non-parentheses\n | \\g # or recurse into further depth\n )*\n \\) # Closing parenthesis\n )\n )\n # Type inside balanced brackets\n | ('? # Optional promotion tick\n (?\n \\( # Opening bracket\n (?:\n [^\\[\\]]* # Match non-brackets\n | \\g # or recurse into further depth\n )*\n \\] # Closing bracket\n )\n )\n ) \n # Then either\n \\s*\n # - a symbolic infix constructor, or\n (?:(?|\u21D2)\n (?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])\n" }, "cpp": { "captures": { "1": { "name": "punctuation.definition.preprocessor.c" } }, "comment": `In addition to Haskell's "native" syntax, GHC permits the C preprocessor to be run on a source file.`, "match": "^(#).*$", "name": "meta.preprocessor.c" }, "data_constructor": { "match": "\\b(?|\u2192)", "endCaptures": { "1": { "name": "keyword.operator.period.haskell" }, "2": { "name": "keyword.operator.arrow.haskell" } }, "patterns": [{ "include": "#comment_like" }, { "include": "#type_variable" }, { "include": "#type_signature" }] }, "fun_decl": { "begin": "(?x)^(\\s*)\n (?\n (?:\n [\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*\\#*\n | \\(\\s*\n (?!--+\\))\n [\\p{S}\\p{P}&&[^(),:;\\[\\]`{}_\"']]\n [\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]*\n \\s*\\)\n )\n (?:\\s*,\\s*\\g)?\n )\n \\s*(?)\n ((<-|\u2190)|(=)|(-<|\u21A2)|(-<<|\u291B))\n # non-symbolic character\n ([(),;\\[\\]`{}_\"']|[^\\p{S}\\p{P}])\n )\n # Decreasing indentation:\n |(?=\\}|;) # Explicit indentation\n |^(?! # Implicit indentation: end match on newline *unless* the new line is either:\n \\1\\s+\\S # - more indented, or\n | \\s* # - starts with whitespace, followed by:\n (?: $ # - the end of the line (i.e. empty line), or\n |\\{-[^@] # - the start of a block comment, or\n |--+ # - the start of a single-line comment.\n (?![\\p{S}\\p{P}&&[^(),;\\[\\]{}`_\"']]).*$) # non-symbol\n # The double dash may not be followed by other operator characters\n # (then it would be an operator, not a comment)\n )\n", "name": "meta.function.type-declaration.haskell", "patterns": [{ "include": "#type_signature" }] }, "gadt_constructor": { "patterns": [{ "begin": "(?x)\n ^(\\s*)\n (?:\n (\\b(?[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(\\.\\g)?)", "name": "entity.name.namespace.haskell" }, "numeric_literals": { "patterns": [{ "include": "#float_literals" }, { "include": "#integer_literals" }] }, "overloaded_label": { "patterns": [{ "captures": { "1": { "name": "keyword.operator.prefix.hash.haskell" }, "2": { "patterns": [{ "include": "#string_literal" }] } }, "match": '(?x) \n (?|\u2192)\n |(-<|\u21A2)\n |(-<<|\u291B)\n |(>-|\u291A)\n |(>>-|\u291C)\n |(\u2200)\n )\n (?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"'']])" }, { "captures": { "1": { "name": "keyword.operator.postfix.hash.haskell" } }, "match": "(?x)\n (?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\\p{S}\\p{P}&&[^\\#,;\\[`{]]) # Require closing characters\n (\\#+)\n (?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\\p{S}\\p{P}&&[^),;\\]`}]]) # Disallow opening character" }, { "captures": { "1": { "name": "keyword.operator.infix.tight.at.haskell" } }, "match": "(?x)\n (?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\\)\\}\\]]) # Require closing characters\n (@)\n (?=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\\(\\[\\{]) # Require opening character" }, { "captures": { "1": { "name": "keyword.operator.prefix.tilde.haskell" }, "2": { "name": "keyword.operator.prefix.bang.haskell" }, "3": { "name": "keyword.operator.prefix.minus.haskell" }, "4": { "name": "keyword.operator.prefix.dollar.haskell" }, "5": { "name": "keyword.operator.prefix.double-dollar.haskell" } }, "match": "(?x)\n (?)\n (?)\n (?|\u21D2", "name": "keyword.operator.big-arrow.haskell" }, { "include": "#string_literal" }, { "match": "'[^']'", "name": "invalid" }, { "include": "#type_application" }, { "include": "#reserved_symbol" }, { "include": "#type_operator" }, { "include": "#type_constructor" }, { "begin": "(\\()(#)", "beginCaptures": { "1": { "name": "punctuation.paren.haskell" }, "2": { "name": "keyword.operator.hash.haskell" } }, "end": "(#)(\\))", "endCaptures": { "1": { "name": "keyword.operator.hash.haskell" }, "2": { "name": "punctuation.paren.haskell" } }, "patterns": [{ "include": "#comma" }, { "include": "#type_signature" }] }, { "begin": "(')?(\\()", "beginCaptures": { "1": { "name": "keyword.operator.promotion.haskell" }, "2": { "name": "punctuation.paren.haskell" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.paren.haskell" } }, "patterns": [{ "include": "#comma" }, { "include": "#type_signature" }] }, { "begin": "(')?(\\[)", "beginCaptures": { "1": { "name": "keyword.operator.promotion.haskell" }, "2": { "name": "punctuation.bracket.haskell" } }, "end": "(\\])", "endCaptures": { "1": { "name": "punctuation.bracket.haskell" } }, "patterns": [{ "include": "#comma" }, { "include": "#type_signature" }] }, { "include": "#type_variable" }] }, "type_variable": { "match": "\\b(?