mirror of
https://github.com/imezx/Warp.git
synced 2025-04-25 07:30:02 +00:00
82 lines
58 KiB
JavaScript
82 lines
58 KiB
JavaScript
|
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": "(?<!@|#)-\\}", "name": "invalid" }, { "captures": { "1": { "name": "punctuation.paren.haskell" }, "2": { "name": "punctuation.paren.haskell" } }, "match": "(\\()\\s*(\\))", "name": "constant.language.unit.haskell" }, { "captures": { "1": { "name": "punctuation.paren.haskell" }, "2": { "name": "keyword.operator.hash.haskell" }, "3": { "name": "keyword.operator.hash.haskell" }, "4": { "name": "punctuation.paren.haskell" } }, "match": "(\\()(#)\\s*(#)(\\))", "name": "constant.language.unit.unboxed.haskell" }, { "captures": { "1": { "name": "punctuation.paren.haskell" }, "2": { "name": "punctuation.paren.haskell" } }, "match": "(\\()\\s*,[\\s,]*(\\))", "name": "support.constant.tuple.haskell" }, { "captures": { "1": { "name": "punctuation.paren.haskell" }, "2": { "name": "keyword.operator.hash.haskell" }, "3": { "name": "keyword.operator.hash.haskell" }, "4": { "name": "punctuation.paren.haskell" } }, "match": "(\\()(#)\\s*,[\\s,]*(#)(\\))", "name": "support.constant.tuple.unboxed.haskell" }, { "captures": { "1": { "name": "punctuation.bracket.haskell" }, "2": { "name": "punctuation.bracket.haskell" } }, "match": "(\\[)\\s*(\\])", "name": "constant.language.empty-list.haskell" }, { "begin": "(\\b(?<!')(module)|^(signature))(\\b(?!'))", "beginCaptures": { "2": { "name": "keyword.other.module.haskell" }, "3": { "name": "keyword.other.signature.haskell" } }, "end": "(?=\\b(?<!')where\\b(?!'))", "name": "meta.declaration.module.haskell", "patterns": [{ "include": "#comment_like" }, { "include": "#module_name" }, { "include": "#module_exports" }, { "match": "[a-z]+", "name": "invalid" }] }, { "include": "#ffi" }, { "begin": "^(\\s*)(class)(\\b(?!'))", "beginCaptures": { "2": { "name": "keyword.other.class.haskell" } }, "end": "(?x) # Detect end of class declaration:\n # 'where' keyword\n (?=(?<!')\\bwhere\\b(?!')) \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 )", "name": "meta.declaration.class.haskell", "patterns": [{ "include": "#comment_like" }, { "include": "#where" }, { "include": "#type_signature" }] }, { "begin": `(?x)
|
||
|
^(\\s*)(data|newtype)(?:\\s+(instance))?\\s+
|
||
|
# Keep consuming characters until:
|
||
|
((?:(?!
|
||
|
# the equals symbol or the start of a single-line comment, or
|
||
|
(?:
|
||
|
(?<![\\p{S}\\p{P}&&[^(),;\\[\\]\`{}_"']]) # non-symbol
|
||
|
(?:=|--+)
|
||
|
(?![\\p{S}\\p{P}&&[^(),;\\[\\]\`{}_"']]) # non-symbol
|
||
|
)
|
||
|
# the "where" or "deriving" keywords, or
|
||
|
| (?:\\b(?<!')(?:where|deriving)\\b(?!'))
|
||
|
# the start of a block comment.
|
||
|
| {-
|
||
|
#
|
||
|
).)*)
|
||
|
(?=\\b(?<!'')where\\b(?!''))`, "beginCaptures": { "2": { "name": "keyword.other.$2.haskell" }, "3": { "name": "keyword.other.instance.haskell" }, "4": { "patterns": [{ "include": "#type_signature" }] } }, "end": "(?x) # Detect end of data declaration:\n # Deriving clause\n (?=(?<!')\\bderiving\\b(?!')) \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.declaration.$2.generalized.haskell", "patterns": [{ "include": "#comment_like" }, { "begin": "(?x)\n (?<!')\\b(where)\n \\s*(\\{)(?!-)", "beginCaptures": { "1": { "name": "keyword.other.where.haskell" }, "2": { "name": "punctuation.brace.haskell" } }, "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.brace.haskell" } }, "patterns": [{ "include": "#comment_like" }, { "include": "#gadt_constructor" }, { "match": ";", "name": "punctuation.semicolon.haskell" }] }, { "match": "\\b(?<!')(where)\\b(?!')", "name": "keyword.other.where.haskell" }, { "include": "#deriving" }, { "include": "#gadt_constructor" }] }, { "include": "#role_annotation" }, { "begin": "^(\\s*)(pattern)\\s+(.*?)\\s+(::|\u2237)(?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])", "beginCaptures": { "2": { "name": "keyword.other.pattern.haskell" }, "3": { "patterns": [{ "include": "#comma" }, { "include": "#data_constructor" }] }, "4": { "name": "keyword.operator.double-colon.haskell" } }, "end": "(?x) # Detect end of pattern type definition by 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.declaration.pattern.type.haskell", "patterns": [{ "include": "#type_signature" }] }, { "begin": "^\\s*(pattern)\\b(?!')", "captures": { "1": { "name": "keyword.other.pattern.haskell" } }, "end": "(?x) # Detect end of pattern type definition by 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.declaration.pattern.haskell", "patterns": [{ "include": "$self" }] }, { "begin": `(?x)
|
||
|
# Data declaration
|
||
|
^(\\s*)(data|newtype)(?:\\s+(family|instance))?\\s+
|
||
|
# Keep consuming characters until:
|
||
|
(((?!
|
||
|
# the equals symbol or the start of a single-line comment, or
|
||
|
(?:
|
||
|
(?<![\\p{S}\\p{P}&&[^(),;\\[\\]\`{}_"']]) # non-symbol
|
||
|
(?:=|--+)
|
||
|
(?![\\p{S}\\p{P}&&[^(),;\\[\\]\`{}_"']]) # non-symbol
|
||
|
)
|
||
|
# the "where" or "deriving" keywords, or
|
||
|
| (?:\\b(?<!')(?:where|deriving)\\b(?!'))
|
||
|
# the start of a block comment.
|
||
|
| {-
|
||
|
#
|
||
|
).)*)`, "beginCaptures": { "2": { "name": "keyword.other.$2.haskell" }, "3": { "name": "keyword.other.$3.haskell" }, "4": { "patterns": [{ "include": "#type_signature" }] } }, "end": "(?x) # Detect end of data declaration: \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 )", "name": "meta.declaration.$2.algebraic.haskell", "patterns": [{ "include": "#comment_like" }, { "include": "#deriving" }, { "include": "#forall" }, { "include": "#adt_constructor" }, { "include": "#context" }, { "include": "#record_decl" }, { "include": "#type_signature" }] }, { "begin": `(?x)
|
||
|
# Type family
|
||
|
^(\\s*)(type)\\s+(family)\\b(?!')
|
||
|
# Keep consuming characters until:
|
||
|
(((?!
|
||
|
# the equals symbol or the start of a single-line comment, or
|
||
|
(?:
|
||
|
(?<![\\p{S}\\p{P}&&[^(),;\\[\\]\`{}_"']]) # non-symbol
|
||
|
(?:=|--+)
|
||
|
(?![\\p{S}\\p{P}&&[^(),;\\[\\]\`{}_"']]) # non-symbol
|
||
|
)
|
||
|
# the "where" keyword, or
|
||
|
| \\b(?<!')where\\b(?!')
|
||
|
# the start of a block comment.
|
||
|
| {-
|
||
|
#
|
||
|
).)*)`, "beginCaptures": { "2": { "name": "keyword.other.type.haskell" }, "3": { "name": "keyword.other.family.haskell" }, "4": { "patterns": [{ "include": "#comment_like" }, { "include": "#where" }, { "include": "#type_signature" }] } }, "end": "(?x) # Detect end of type family by 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.declaration.type.family.haskell", "patterns": [{ "include": "#comment_like" }, { "include": "#where" }, { "include": "#type_signature" }] }, { "begin": "(?x)\n # Type declaration\n ^(\\s*)(type)(?:\\s+(instance))?\\s+\n # Keep consuming characters until:\n (((?!\n # the equals symbol, the start of a single-line comment, or a type signature\n (?: \n (?<![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]) # non-symbol\n (?:=|--+|::|\u2237)\n (?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]) # non-symbol\n )\n # the start of a block comment.\n | {-\n #\n ).)*)", "beginCaptures": { "2": { "name": "keyword.other.type.haskell" }, "3": { "name": "keyword.other.instance.haskell" }, "4": { "patterns": [{ "include": "#type_signature" }] } }, "end": "(?x) # Detect end of type definition by 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.declaration.type.haskell", "patterns": [{ "include": "#type_signature" }] }, { "begin": "^(\\s*)(instance)(\\b(?!'))", "beginCaptures": { "2": { "name": "keyword.other.instance.haskell" } }, "end": "(?x) # Detect end of instance declaration:\n # 'where' keyword\n (?=\\b(?<!')(where)\\b(?!'))\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.declaration.instance.haskell", "patterns": [{ "include": "#comment_like" }, { "include": "#where" }, { "include": "#type_signature" }] }, { "begin": "^(\\s*)(import)(\\b(?!'))", "beginCaptures": { "2": { "name": "keyword.other.import.haskell" } }, "end": "(?x) # Detect end of import\n # 'where' keyword\n (?=\\b(?<!')(where)\\b(?!'))\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
|
||
|
(?<![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])
|
||
|
(')
|
||
|
(?:
|
||
|
[\\ -\\[\\]-~] # Basic Char
|
||
|
| (\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE
|
||
|
|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS
|
||
|
|US|SP|DEL|[abfnrtv\\\\\\"'\\\\&])) # Escapes
|
||
|
| (\\\\o[0-7]+) # Octal Escapes
|
||
|
| (\\\\x[0-9A-Fa-f]+) # Hexadecimal Escapes
|
||
|
| (\\\\\\^[A-Z@\\[\\]\\\\\\^_]) # Control Chars
|
||
|
)
|
||
|
(')
|
||
|
`, "name": "string.quoted.single.haskell" }, "comma": { "match": ",", "name": "punctuation.separator.comma.haskell" }, "comment_like": { "patterns": [{ "include": "#cpp" }, { "include": "#pragma" }, { "include": "#comments" }] }, "comments": { "patterns": [{ "begin": "^(\\s*)(--\\s[\\|\\$])", "beginCaptures": { "2": { "name": "punctuation.whitespace.comment.leading.haskell" } }, "end": "(?=^(?!\\1--+(?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])))", "name": "comment.block.documentation.haskell" }, { "begin": "(^[ \\t]+)?(--\\s[\\^\\*])", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.haskell" } }, "end": "\\n", "name": "comment.line.documentation.haskell" }, { "applyEndPatternLast": 1, "begin": "\\{-\\s?[\\|\\$\\*\\^]", "captures": { "0": { "name": "punctuation.definition.comment.haskell" } }, "end": "-\\}", "name": "comment.block.documentation.haskell", "patterns": [{ "include": "#block_comment" }] }, { "begin": "(^[ \\t]+)?(?=--+(?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]))", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.haskell" } }, "comment": "Operators may begin with '--' as long as they are not entirely composed of '-' characters. This means comments can't be immediately followed by an allowable operator character.", "end": "(?!\\G)", "patterns": [{ "begin": "--", "beginCaptures": { "0": { "name": "punctuation.definition.comment.haskell" } }, "end": "\\n", "name": "comment.line.double-dash.haskell" }] }, { "include": "#block_comment" }] }, "context": { "captures": { "1": { "patterns": [{ "include": "#comment_like" }, { "include": "#type_signature" }] }, "2": { "name": "keyword.operator.big-arrow.haskell" } }, "match": "(?x)\n (.*)\n (?<![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])\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(?<!')[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?![\\.'\\w])", "name": "constant.other.haskell" }, "deriving": { "patterns": [{ "begin": "^(\\s*)(deriving)\\s+(?:(via|stock|newtype|anyclass)\\s+)?", "beginCaptures": { "2": { "name": "keyword.other.deriving.haskell" }, "3": { "name": "keyword.other.deriving.strategy.$3.haskell" } }, "end": "(?x) # Detect end of deriving statement\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 )", "name": "meta.deriving.haskell", "patterns": [{ "include": "#comment_like" }, { "match": "(?<!')\\b(instance)\\b(?!')", "name": "keyword.other.instance.haskell" }, { "captures": { "1": { "name": "keyword.other.deriving.strategy.$1.haskell" } }, "match": "(?<!')\\b(via|stock|newtype|anyclass)\\b(?!')" }, { "include": "#type_signature" }] }, { "begin": "(deriving)(?:\\s+(stock|newtype|anyclass))?\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.other.deriving.haskell" }, "2": { "name": "keyword.other.deriving.strategy.$2.haskell" }, "3": { "name": "punctuation.paren.haskell" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.paren.haskell" } }, "name": "meta.deriving.haskell", "patterns": [{ "include": "#type_signature" }] }, { "captures": { "1": { "name": "keyword.other.deriving.haskell" }, "2": { "name": "keyword.other.deriving.strategy.$2.haskell" }, "3": { "patterns": [{ "include":
|
||
|
\\b(?<!')(safe|unsafe|interruptible)\\b(?!')
|
||
|
\\s*
|
||
|
("(?:\\\\"|[^"])*")?
|
||
|
\\s*
|
||
|
(?:
|
||
|
(?:\\b(?<!'')([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\b(?!'))
|
||
|
|(?:\\(\\s*(?!--+\\))([\\p{S}\\p{P}&&[^(),;\\[\\]\`{}_"']]+)\\s*\\))
|
||
|
)
|
||
|
` }, { "captures": { "1": { "name": "keyword.other.safety.$1.haskell" }, "2": { "name": "entity.name.foreign.haskell", "patterns": [{ "include": "#string_literal" }] } }, "match": `(?x)
|
||
|
\\b(?<!')(safe|unsafe|interruptible)\\b(?!')
|
||
|
\\s*
|
||
|
("(?:\\\\"|[^"])*")?
|
||
|
\\s*$
|
||
|
` }, { "captures": { "0": { "name": "entity.name.foreign.haskell", "patterns": [{ "include": "#string_literal" }] } }, "match": '(?x)\n "(?:\\\\"|[^"])*"' }, { "captures": { "1": { "name": "entity.name.function.haskell" }, "2": { "name": "punctuation.paren.haskell" }, "3": { "name": "entity.name.function.infix.haskell" }, "4": { "name": "punctuation.paren.haskell" } }, "match": "(?x)\n (?:\\b(?<!'')([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\b(?!'))\n |(?:(\\()\\s*(?!--+\\))([\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+)\\s*(\\)))\n" }] }, { "include": "#double_colon" }, { "include": "#type_signature" }] }, "float_literals": { "captures": { "1": { "name": "constant.numeric.floating.decimal.haskell" }, "2": { "name": "constant.numeric.floating.hexadecimal.haskell" } }, "comment": "Floats are decimal or hexadecimal", "match": "(?x)\n \\b(?<!')\n (?: # Decimal\n ([0-9][_0-9]*\\.[0-9][_0-9]*(?:[eE][-+]?[0-9][_0-9]*)?\n |[0-9][_0-9]*[eE][-+]?[0-9][_0-9]*\n )\n | # Hexadecimal\n (0[xX]_*[0-9a-fA-F][_0-9a-fA-F]*\\.[0-9a-fA-F][_0-9a-fA-F]*(?:[pP][-+]?[0-9][_0-9]*)?\n |0[xX]_*[0-9a-fA-F][_0-9a-fA-F]*[pP][-+]?[0-9][_0-9]*\n )\n )\\b(?!')" }, "forall": { "begin": "\\b(?<!')(forall|\u2200)\\b(?!')", "beginCaptures": { "1": { "name": "keyword.other.forall.haskell" } }, "end": "(\\.)|(->|\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 (?<fn>\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<fn>)?\n )\n \\s*(?<![\\p{S}\\p{P}&&[^\\),;\\]`}_\"']])(::|\u2237)(?![\\p{S}\\p{P}&&[^\\(,;\\[`{_\"']])\n", "beginCaptures": { "2": { "name": "entity.name.function.haskell", "patterns": [{ "include": "#reserved_symbol" }, { "include": "#prefix_op" }] }, "3": { "name": "keyword.operator.double-colon.haskell" } }, "end": "(?x)\n # End of type annotation:\n # To the left of a reserved symbolic keyword such as = or <-\n (?= \n # non-symbolic character\n (?<![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])\n # symbolic keyword except (->)\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}']*)\n |(\\()\\s*(:[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]*)\\s*(\\))\n )", "beginCaptures": { "2": { "name": "constant.other.haskell" }, "3": { "name": "punctuation.paren.haskell" }, "4": { "name": "constant.other.operator.haskell" }, "5": { "name": "punctuation.paren.haskell" } }, "end": "(?x)\n # GADT constructor ends\n (?=\\b(?<!'')deriving\\b(?!')) \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
|
||
|
var haskell = [
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { haskell as default };
|