grammars/source.haskell.json in github-linguist-4.8.8 vs grammars/source.haskell.json in github-linguist-4.8.9

- old
+ new

@@ -1,449 +1,1215 @@ { "fileTypes": [ "hs" ], - "keyEquivalent": "^~H", + "firstLineMatch": "^\\#\\!.*\\brunhaskell\\b", "name": "Haskell", - "patterns": [ - { - "captures": { - "1": { - "name": "punctuation.definition.entity.haskell" + "scopeName": "source.haskell", + "macros": { + "identStartCharClass": "[\\p{Ll}_\\p{Lu}\\p{Lt}]", + "identCharClass": "[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']", + "functionNameOne": "[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", + "classNameOne": "[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", + "functionName": "(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", + "className": "[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*", + "operatorChar": "[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]", + "operator": "[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+", + "operatorFun": "(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\))", + "basicChar": "[\\ -\\[\\]-~]", + "escapeChar": "\\\\(?: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\\\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?:(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))|(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])))" + }, + "repository": { + "block_comment": { + "patterns": [ + { + "name": "comment.block.haddock.haskell", + "begin": "\\{-\\s*[|^]", + "end": "-\\}", + "applyEndPatternLast": 1, + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.haddock.haskell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.haddock.haskell" + } + }, + "patterns": [ + { + "include": "#block_comment" + } + ] }, - "2": { - "name": "punctuation.definition.entity.haskell" + { + "name": "comment.block.haskell", + "begin": "\\{-", + "end": "-\\}", + "applyEndPatternLast": 1, + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.block.start.haskell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.block.end.haskell" + } + }, + "patterns": [ + { + "include": "#block_comment" + } + ] } - }, - "comment": "In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10]).", - "match": "(`)[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(`)", - "name": "keyword.operator.function.infix.haskell" + ] }, - { - "match": "\\(\\)", - "name": "constant.language.unit.haskell" - }, - { - "match": "\\[\\]", - "name": "constant.language.empty-list.haskell" - }, - { - "begin": "\\b(module)\\b", - "beginCaptures": { - "1": { - "name": "keyword.other.haskell" - } - }, - "end": "\\b(where)\\b", - "endCaptures": { - "1": { - "name": "keyword.other.haskell" - } - }, - "name": "meta.declaration.module.haskell", + "comments": { "patterns": [ { - "include": "#module_name" + "begin": "(^[ \\t]+)?(?=--+\\s+[|^])", + "end": "(?!\\G)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.haskell" + } + }, + "patterns": [ + { + "name": "comment.line.double-dash.haddock.haskell", + "begin": "(--+)\\s+([|^])", + "end": "\\n", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.haskell" + }, + "2": { + "name": "punctuation.definition.comment.haddock.haskell" + } + } + } + ] }, { - "include": "#module_exports" + "begin": "(^[ \\t]+)?(?=--+(?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]))", + "end": "(?!\\G)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.haskell" + } + }, + "patterns": [ + { + "name": "comment.line.double-dash.haskell", + "begin": "--", + "end": "\\n", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.haskell" + } + } + } + ] }, { - "match": "[a-z]+", - "name": "invalid" + "include": "#block_comment" } ] }, - { - "begin": "\\b(class)\\b", - "beginCaptures": { - "1": { - "name": "keyword.other.haskell" - } - }, - "end": "\\b(where)\\b", - "endCaptures": { - "1": { - "name": "keyword.other.haskell" - } - }, - "name": "meta.declaration.class.haskell", + "characters": { "patterns": [ { - "match": "\\b(Monad|Functor|Eq|Ord|Read|Show|Num|(Frac|Ra)tional|Enum|Bounded|Real(Frac|Float)?|Integral|Floating)\\b", - "name": "support.class.prelude.haskell" + "match": "\\\\(?: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\\\\\\\"'\\&])", + "name": "constant.character.escape.haskell" }, { - "match": "[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", - "name": "entity.other.inherited-class.haskell" + "match": "(?:\\\\o[0-7]+)", + "name": "constant.character.escape.octal.haskell" }, { - "match": "\\b[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", - "name": "variable.other.generic-type.haskell" + "match": "(?:\\\\x[0-9A-Fa-f]+)", + "name": "constant.character.escape.hexadecimal.haskell" + }, + { + "match": "(?:\\^[A-Z@\\[\\]\\\\\\^_])", + "name": "constant.character.escape.control.haskell" } ] }, - { - "begin": "\\b(instance)\\b", - "beginCaptures": { - "1": { - "name": "keyword.other.haskell" + "infix_op": { + "patterns": [ + { + "name": "entity.name.function.infix.haskell", + "match": "(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\))" } - }, - "end": "\\b(where)\\b|$", - "endCaptures": { - "1": { - "name": "keyword.other.haskell" + ] + }, + "module_exports": { + "patterns": [ + { + "name": "meta.declaration.exports.haskell", + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#function_name" + }, + { + "include": "#type_name" + }, + { + "include": "#comma" + }, + { + "name": "meta.other.constructor-list.haskell", + "begin": "(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))\\s*\\(", + "end": "\\)", + "patterns": [ + { + "include": "#type_ctor" + }, + { + "include": "#attribute_name" + }, + { + "include": "#comma" + }, + { + "match": "\\.\\.", + "name": "keyword.operator.wildcard.haskell" + } + ] + }, + { + "include": "#infix_op" + } + ] } - }, - "name": "meta.declaration.instance.haskell", + ] + }, + "module_name": { "patterns": [ { - "include": "#type_signature" + "name": "support.other.module.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" } ] }, - { - "begin": "\\b(import)\\b", - "beginCaptures": { - "1": { - "name": "keyword.other.haskell" + "module_name_prefix": { + "patterns": [ + { + "name": "support.other.module.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\." } - }, - "end": "($|;|(?=--))", - "name": "meta.import.haskell", + ] + }, + "pragma": { "patterns": [ { - "match": "(qualified|as|hiding)", - "name": "keyword.other.haskell" + "name": "meta.preprocessor.haskell", + "begin": "\\{-#", + "end": "#-\\}", + "patterns": [ + { + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(NOTINLINE CONSTRUCTORLIKE|NOINLINE CONSTRUCTORLIKE|INLINE CONSTRUCTORLIKE|SPECIALISE NOTINLINE|SPECIALIZE NOTINLINE|SPECIALISE NOINLINE|SPECIALIZE NOINLINE|NOTINLINE CONLIKE|SPECIALISE INLINE|SPECIALIZE INLINE|NOINLINE CONLIKE|VECTORISE SCALAR|VECTORIZE SCALAR|OPTIONS_HADDOCK|INLINE CONLIKE|OPTIONS_DERIVE|OPTIONS_CATCH|OPTIONS_NHC98|OPTIONS_HUGS|OVERLAPPABLE|NOVECTORISE|NOVECTORIZE|OPTIONS_GHC|OPTIONS_JHC|OPTIONS_YHC|OVERLAPPING|DEPRECATED|INCOHERENT|INLINEABLE|SPECIALISE|SPECIALIZE|GENERATED|INLINABLE|NOTINLINE|VECTORISE|VECTORIZE|CONTRACT|LANGUAGE|NOINLINE|NOUNPACK|OVERLAPS|INCLUDE|MINIMAL|OPTIONS|WARNING|CFILES|INLINE|SOURCE|UNPACK|CTYPE|RULES|CORE|LINE|ANN|SCC)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "name": "keyword.other.preprocessor.haskell" + } + ] + } + ] + }, + "function_type_declaration": { + "patterns": [ + { + "name": "meta.function.type-declaration.haskell", + "begin": "^([ \\t]*)(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\)))(?:(?:\\s*,\\s*)(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\))))*))(?:\\s*(::|∷)))", + "end": "^(?!\\1[ \\t]|[ \\t]*$)", + "contentName": "meta.type-signature.haskell", + "beginCaptures": { + "2": { + "patterns": [ + { + "include": "#function_name" + }, + { + "include": "#infix_op" + } + ] + }, + "3": { + "name": "keyword.other.double-colon.haskell" + } + }, + "patterns": [ + { + "include": "#type_signature" + } + ] + } + ] + }, + "ctor_type_declaration": { + "patterns": [ + { + "name": "meta.ctor.type-declaration.haskell", + "begin": "^([ \\t]*)(?:(?:((?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\)))(?:(?:\\s*,\\s*)(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\))))*))(?:\\s*(::|∷)))", + "end": "^(?!\\1[ \\t]|[ \\t]*$)", + "contentName": "meta.type-signature.haskell", + "beginCaptures": { + "2": { + "patterns": [ + { + "include": "#type_ctor" + }, + { + "include": "#infix_op" + } + ] + }, + "3": { + "name": "keyword.other.double-colon.haskell" + } + }, + "patterns": [ + { + "include": "#type_signature" + } + ] + } + ] + }, + "record_field_declaration": { + "patterns": [ + { + "name": "meta.record-field.type-declaration.haskell", + "begin": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\)))(?:(?:\\s*,\\s*)(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\))))*))(?:\\s*(::|∷)))", + "end": "(?=(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\)))(?:(?:\\s*,\\s*)(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\))))*))(?:\\s*(::|∷)))|})", + "contentName": "meta.type-signature.haskell", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#attribute_name" + }, + { + "include": "#infix_op" + } + ] + }, + "2": { + "name": "keyword.other.double-colon.haskell" + } + }, + "patterns": [ + { + "include": "#type_signature" + } + ] + } + ] + }, + "type_signature": { + "patterns": [ + { + "include": "#pragma" }, { - "include": "#module_name" + "include": "#comments" }, { - "include": "#module_exports" + "name": "keyword.other.forall.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))forall(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" + }, + { + "include": "#unit" + }, + { + "include": "#empty_list" + }, + { + "name": "keyword.other.arrow.haskell", + "match": "(?<![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])(->|→)(?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])" + }, + { + "name": "keyword.other.big-arrow.haskell", + "match": "(?<![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])(=>|⇒)(?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])" + }, + { + "include": "#operator" + }, + { + "name": "variable.other.generic-type.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" + }, + { + "include": "#type_name" } ] }, - { - "begin": "(deriving)\\s*\\(", - "beginCaptures": { - "1": { - "name": "keyword.other.haskell" + "unit": { + "patterns": [ + { + "name": "constant.language.unit.haskell", + "match": "\\(\\)" } - }, - "end": "\\)", - "name": "meta.deriving.haskell", + ] + }, + "empty_list": { "patterns": [ { - "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", - "name": "entity.other.inherited-class.haskell" + "name": "constant.language.empty-list.haskell", + "match": "\\[\\]" } ] }, - { - "match": "\\b(deriving|where|data|type|case|of|let|in|newtype|default)\\b", - "name": "keyword.other.haskell" + "deriving": { + "patterns": [ + { + "include": "#deriving_list" + }, + { + "include": "#deriving_simple" + }, + { + "include": "#deriving_keyword" + } + ] }, - { - "match": "\\binfix[lr]?\\b", - "name": "keyword.operator.haskell" + "deriving_keyword": { + "patterns": [ + { + "name": "meta.deriving.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(deriving)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "captures": { + "1": { + "name": "keyword.other.haskell" + } + } + } + ] }, - { - "match": "\\b(do|if|then|else)\\b", - "name": "keyword.control.haskell" + "deriving_list": { + "patterns": [ + { + "name": "meta.deriving.haskell", + "begin": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(deriving)\\s*\\(", + "end": "\\)", + "beginCaptures": { + "1": { + "name": "keyword.other.haskell" + } + }, + "patterns": [ + { + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "captures": { + "1": { + "name": "entity.other.inherited-class.haskell" + } + } + } + ] + } + ] }, - { - "comment": "Floats are always decimal", - "match": "\\b([0-9]+\\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b", - "name": "constant.numeric.float.haskell" + "deriving_simple": { + "patterns": [ + { + "name": "meta.deriving.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(deriving)\\s*([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "captures": { + "1": { + "name": "keyword.other.haskell" + }, + "2": { + "name": "entity.other.inherited-class.haskell" + } + } + } + ] }, - { - "match": "\\b([0-9]+|0([xX][0-9a-fA-F]+|[oO][0-7]+))\\b", - "name": "constant.numeric.haskell" - }, - { - "captures": { - "1": { - "name": "punctuation.definition.preprocessor.c" + "infix_function": { + "patterns": [ + { + "name": "keyword.operator.function.infix.haskell", + "match": "(`)(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(`)", + "captures": { + "1": { + "name": "punctuation.definition.entity.haskell" + }, + "2": { + "name": "punctuation.definition.entity.haskell" + } + } } - }, - "comment": "In addition to Haskell's \"native\" syntax, GHC permits the C preprocessor to be run on a source file.", - "match": "^\\s*(#)\\s*\\w+", - "name": "meta.preprocessor.c" + ] }, - { - "include": "#pragma" - }, - { - "begin": "\"", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.haskell" + "quasi_quotes": { + "patterns": [ + { + "begin": "(\\[)([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)(\\|)", + "end": "(\\|)(\\])", + "beginCaptures": { + "1": { + "name": "punctuation.definition.quasiquotes.begin.haskell" + }, + "2": { + "name": "entity.name.tag.haskell" + } + }, + "endCaptures": { + "2": { + "name": "punctuation.definition.quasiquotes.end.haskell" + } + }, + "contentName": "string.quoted.quasiquotes.haskell" } - }, - "end": "\"", - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.haskell" - } - }, - "name": "string.quoted.double.haskell", + ] + }, + "module_decl": { "patterns": [ { - "match": "\\\\(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\\\\\\\"'\\&])", - "name": "constant.character.escape.haskell" - }, - { - "match": "\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+", - "name": "constant.character.escape.octal.haskell" - }, - { - "match": "\\^[A-Z@\\[\\]\\\\\\^_]", - "name": "constant.character.escape.control.haskell" - }, - { - "begin": "\\\\\\s", + "name": "meta.declaration.module.haskell", + "begin": "^([ \\t]*)(module)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "end": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(where)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", "beginCaptures": { - "0": { - "name": "constant.character.escape.begin.haskell" + "2": { + "name": "keyword.other.haskell" } }, - "end": "\\\\", "endCaptures": { - "0": { - "name": "constant.character.escape.end.haskell" + "1": { + "name": "keyword.other.haskell" } }, "patterns": [ { - "match": "\\S+", - "name": "invalid.illegal.character-not-allowed-here.haskell" + "include": "#comments" + }, + { + "include": "#module_name" + }, + { + "include": "#module_exports" + }, + { + "include": "#invalid" } ] } ] }, - { - "captures": { - "1": { - "name": "punctuation.definition.string.begin.haskell" - }, - "2": { - "name": "constant.character.escape.haskell" - }, - "3": { - "name": "constant.character.escape.octal.haskell" - }, - "4": { - "name": "constant.character.escape.hexadecimal.haskell" - }, - "5": { - "name": "constant.character.escape.control.haskell" - }, - "6": { - "name": "punctuation.definition.string.end.haskell" + "class_decl": { + "patterns": [ + { + "name": "meta.declaration.class.haskell", + "begin": "^([ \\t]*)(class)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "end": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(where)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))|$", + "beginCaptures": { + "2": { + "name": "storage.type.class.haskell" + } + }, + "endCaptures": { + "1": { + "name": "keyword.other.haskell" + } + }, + "patterns": [ + { + "include": "#type_signature" + } + ] } - }, - "match": "(?x)\n\t\t\t(')\n\t\t\t(?:\n\t\t\t\t[\\ -\\[\\]-~]\t\t\t\t\t\t\t\t# Basic Char\n\t\t\t | (\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE\n\t\t\t\t\t|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS\n\t\t\t\t\t|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]))\t\t# Escapes\n\t\t\t | (\\\\o[0-7]+)\t\t\t\t\t\t\t\t# Octal Escapes\n\t\t\t | (\\\\x[0-9A-Fa-f]+)\t\t\t\t\t\t# Hexadecimal Escapes\n\t\t\t | (\\^[A-Z@\\[\\]\\\\\\^_])\t\t\t\t\t\t# Control Chars\n\t\t\t)\n\t\t\t(')\n\t\t\t", - "name": "string.quoted.single.haskell" + ] }, - { - "begin": "^\\s*(?<fn>(?:[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|\\((?!--+\\))((?![(),;\\[\\]`{}_\"'])[\\p{S}\\p{P}])+\\))(?:\\s*,\\s*\\g<fn>)?)\\s*(::)", - "beginCaptures": { - "1": { + "instance_decl": { + "patterns": [ + { + "name": "meta.declaration.instance.haskell", + "begin": "^([ \\t]*)(instance)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "end": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(where)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))|$", + "contentName": "meta.type-signature.haskell", + "beginCaptures": { + "2": { + "name": "keyword.other.haskell" + } + }, + "endCaptures": { + "1": { + "name": "keyword.other.haskell" + } + }, "patterns": [ { - "match": "[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", - "name": "entity.name.function.haskell" + "include": "#pragma" }, { - "include": "#infix_op" + "include": "#type_signature" } ] - }, - "2": { - "name": "keyword.other.double-colon.haskell" } - }, - "end": "$\\n?", - "name": "meta.function.type-declaration.haskell", + ] + }, + "foreign_import": { "patterns": [ { - "include": "#type_signature" + "name": "meta.foreign.haskell", + "begin": "^([ \\t]*)(foreign)\\s+(import|export)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "end": "^(?!\\1[ \\t]|[ \\t]*$)", + "beginCaptures": { + "2": { + "name": "keyword.other.haskell" + }, + "3": { + "name": "keyword.other.haskell" + } + }, + "patterns": [ + { + "match": "(?:un)?safe", + "captures": { + "0": { + "name": "keyword.other.haskell" + } + } + }, + { + "include": "$self" + } + ] } ] }, - { - "match": "\\b(Just|Nothing|Left|Right|True|False|LT|EQ|GT|\\(\\)|\\[\\])\\b", - "name": "support.constant.haskell" - }, - { - "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", - "name": "constant.other.haskell" - }, - { - "include": "#comments" - }, - { - "match": "\\b(abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\\b(?!')", - "name": "support.function.prelude.haskell" - }, - { - "include": "#infix_op" - }, - { - "comment": "In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*.", - "match": "((?![(),;\\[\\]`{}_\"'])[\\p{S}\\p{P}])+", - "name": "keyword.operator.haskell" - }, - { - "match": ",", - "name": "punctuation.separator.comma.haskell" - } - ], - "repository": { - "block_comment": { - "applyEndPatternLast": 1, - "begin": "\\{-(?!#)", - "captures": { - "0": { - "name": "punctuation.definition.comment.haskell" - } - }, - "end": "-\\}", - "name": "comment.block.haskell", + "regular_import": { "patterns": [ { - "include": "#block_comment" + "name": "meta.import.haskell", + "begin": "^([ \\t]*)(import)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "end": "^(?!\\1[ \\t]|[ \\t]*$)", + "beginCaptures": { + "2": { + "name": "keyword.other.haskell" + } + }, + "patterns": [ + { + "include": "#module_name" + }, + { + "include": "#module_exports" + }, + { + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(qualified|as|hiding)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "captures": { + "1": { + "name": "keyword.other.haskell" + } + } + } + ] } ] }, - "comments": { + "data_decl": { "patterns": [ { - "begin": "(^[ \\t]+)?(?=--+((?![\\p{S}\\p{P}])|[(),;\\[\\]`{}_\"']))", + "name": "meta.declaration.type.data.haskell", + "begin": "^([ \\t]*)(data|newtype)\\s+((?:(?!=|where).)*)", + "end": "^(?!\\1[ \\t]|[ \\t]*$)", "beginCaptures": { - "1": { - "name": "punctuation.whitespace.comment.leading.haskell" + "2": { + "name": "storage.type.data.haskell" + }, + "3": { + "name": "meta.type-signature.haskell", + "patterns": [ + { + "include": "#family_and_instance" + }, + { + "include": "#type_signature" + } + ] } }, - "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": "--", + "include": "#comments" + }, + { + "include": "#where" + }, + { + "include": "#deriving" + }, + { + "include": "#assignment_op" + }, + { + "match": "(?:(?:(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s*)(?:((?:(?!deriving)(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:(?!deriving)(?:[\\w()'→⇒\\[\\],]|->|=>)+\\s*)+))(?:(?:\\s+)(?:(?!deriving)(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:(?!deriving)(?:[\\w()'→⇒\\[\\],]|->|=>)+\\s*)+)))*)?))", + "captures": { + "1": { + "patterns": [ + { + "include": "#type_ctor" + } + ] + }, + "2": { + "name": "meta.type-signature.haskell", + "patterns": [ + { + "include": "#type_signature" + } + ] + } + } + }, + { + "match": "\\|", + "captures": { + "0": { + "name": "punctuation.separator.pipe.haskell" + } + } + }, + { + "name": "meta.declaration.type.data.record.block.haskell", + "begin": "\\{", "beginCaptures": { "0": { - "name": "punctuation.definition.comment.haskell" + "name": "keyword.operator.record.begin.haskell" } }, - "end": "\\n", - "name": "comment.line.double-dash.haskell" + "end": "\\}", + "endCaptures": { + "0": { + "name": "keyword.operator.record.end.haskell" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#comma" + }, + { + "include": "#record_field_declaration" + } + ] + }, + { + "include": "#ctor_type_declaration" } ] - }, + } + ] + }, + "type_alias": { + "patterns": [ { - "include": "#block_comment" + "name": "meta.declaration.type.type.haskell", + "begin": "^([ \\t]*)(type)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "end": "^(?!\\1[ \\t]|[ \\t]*$)", + "contentName": "meta.type-signature.haskell", + "beginCaptures": { + "2": { + "name": "storage.type.data.haskell" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#family_and_instance" + }, + { + "include": "#where" + }, + { + "include": "#assignment_op" + }, + { + "include": "#type_signature" + } + ] } ] }, - "infix_op": { - "comment": "An operator cannot be composed entirely of '-' characters; instead, it should be matched as a comment.", - "match": "(\\((?!--+\\))((?![(),;\\[\\]`{}_\"'])[\\p{S}\\p{P}])+\\)|\\(,+\\))", - "name": "entity.name.function.infix.haskell" - }, - "module_exports": { - "begin": "\\(", - "end": "\\)", - "name": "meta.declaration.exports.haskell", + "keywords": { "patterns": [ { - "match": "\\b[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", - "name": "entity.name.function.haskell" + "name": "keyword.other.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(deriving|where|data|type|newtype)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" }, { - "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", - "name": "storage.type.haskell" + "name": "storage.type.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(data|type|newtype)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" }, { - "match": ",", - "name": "punctuation.separator.comma.haskell" + "name": "keyword.operator.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))infix[lr]?(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" }, { - "include": "#infix_op" - }, + "name": "keyword.control.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(do|if|then|else|case|of|let|in|default)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" + } + ] + }, + "c_preprocessor": { + "patterns": [ { - "comment": "So named because I don't know what to call this.", - "match": "\\(.*?\\)", - "name": "meta.other.unknown.haskell" + "name": "meta.preprocessor.c.haskell", + "begin": "^(?=#)", + "end": "(?<!\\\\)(?=\\n)", + "patterns": [ + { + "include": "source.c" + } + ] } ] }, - "module_name": { - "match": "(?<conid>[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(\\.\\g<conid>)?)", - "name": "support.other.module.haskell" + "string": { + "patterns": [ + { + "name": "string.quoted.double.haskell", + "begin": "\"", + "end": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.haskell" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.haskell" + } + }, + "patterns": [ + { + "include": "#characters" + }, + { + "begin": "\\\\\\s", + "end": "\\\\", + "beginCaptures": { + "0": { + "name": "markup.other.escape.newline.begin.haskell" + } + }, + "endCaptures": { + "0": { + "name": "markup.other.escape.newline.end.haskell" + } + }, + "patterns": [ + { + "include": "#invalid" + } + ] + } + ] + } + ] }, - "pragma": { - "begin": "\\{-#", - "end": "#-\\}", - "name": "meta.preprocessor.haskell", + "newline_escape": { "patterns": [ { - "match": "\\b(LANGUAGE|UNPACK|INLINE)\\b", - "name": "keyword.other.preprocessor.haskell" + "name": "markup.other.escape.newline.haskell", + "match": "\\\\$" } ] }, - "type_signature": { + "quoted_character": { "patterns": [ { + "name": "string.quoted.single.haskell", + "match": "(')((?:[\\ -\\[\\]-~]|\\\\(?: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\\\\\\\"'\\&])|(?:\\\\o[0-7]+)|(?:\\\\x[0-9A-Fa-f]+)|(?:\\^[A-Z@\\[\\]\\\\\\^_])))(')", "captures": { "1": { - "name": "entity.other.inherited-class.haskell" + "name": "punctuation.definition.string.begin.haskell" }, "2": { - "name": "variable.other.generic-type.haskell" + "patterns": [ + { + "include": "#characters" + } + ] }, "3": { - "name": "keyword.other.big-arrow.haskell" + "name": "punctuation.definition.string.end.haskell" } - }, - "match": "\\(\\s*([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s+([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\)\\s*(=>)", - "name": "meta.class-constraint.haskell" - }, + } + } + ] + }, + "scoped_type": { + "patterns": [ { - "include": "#pragma" + "match": "\\((?<paren>(?:[^()]|\\(\\g<paren>\\))*)(::|∷)(?<paren2>(?:[^()]|\\(\\g<paren2>\\))*)\\)", + "captures": { + "1": { + "patterns": [ + { + "include": "source.haskell" + } + ] + }, + "2": { + "name": "keyword.other.double-colon.haskell" + }, + "3": { + "name": "meta.type-signature.haskell", + "patterns": [ + { + "include": "#type_signature" + } + ] + } + } }, { - "match": "->", - "name": "keyword.other.arrow.haskell" - }, + "match": "(::|∷)(.*?)(?:(?<![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])(<-|=)(?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])|$)", + "captures": { + "1": { + "name": "keyword.other.double-colon.haskell" + }, + "2": { + "name": "meta.type-signature.haskell", + "patterns": [ + { + "include": "#type_signature" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#assignment_op" + }, + { + "include": "#operator" + } + ] + } + } + } + ] + }, + "scoped_type_override": { + "patterns": [ { - "match": "=>", - "name": "keyword.other.big-arrow.haskell" - }, + "match": "^([ \\t]*)(?:(?:((?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\)))(?:(?:\\s*,\\s*)(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\))))*))(?:\\s*(::|∷)))(.*)(?<![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])(<-|=)(?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']])", + "captures": { + "2": { + "patterns": [ + { + "include": "#identifier" + } + ] + }, + "3": { + "name": "keyword.other.double-colon.haskell" + }, + "4": { + "name": "meta.type-signature.haskell", + "patterns": [ + { + "include": "#type_signature" + } + ] + }, + "5": { + "patterns": [ + { + "include": "#assignment_op" + }, + { + "include": "#operator" + } + ] + } + } + } + ] + }, + "comma": { + "patterns": [ { - "match": "\\b(Int(eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(Error)?)\\b", - "name": "support.type.prelude.haskell" - }, + "name": "punctuation.separator.comma.haskell", + "match": "," + } + ] + }, + "lit_num": { + "patterns": [ { - "match": "\\b[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", - "name": "variable.other.generic-type.haskell" + "name": "constant.numeric.hexadecimal.haskell", + "match": "0[xX][0-9a-fA-F]+" }, { - "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*", - "name": "storage.type.haskell" + "name": "constant.numeric.octal.haskell", + "match": "0[oO][0-7]+" }, { - "match": "\\(\\)", - "name": "support.constant.unit.haskell" + "name": "constant.numeric.float.haskell", + "match": "[0-9]+(\\.[0-9]+[eE][+-]?|\\.|[eE][+-]?)[0-9]+" }, { - "include": "#comments" + "name": "constant.numeric.decimal.haskell", + "match": "[0-9]+" } ] + }, + "operator": { + "patterns": [ + { + "name": "keyword.operator.haskell", + "match": "[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+" + } + ] + }, + "identifier": { + "patterns": [ + { + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "name": "identifier.haskell", + "captures": { + "0": { + "patterns": [ + { + "include": "#module_name_prefix" + }, + { + "name": "support.function.prelude.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(abs|acos|acosh|all|and|any|appendFile|asTypeOf|asin|asinh|atan|atan2|atanh|break|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldMap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|mappend|max|maxBound|maximum|maybe|mconcat|mempty|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|pure|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequenceA|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|traverse|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" + } + ] + } + } + } + ] + }, + "type_name": { + "patterns": [ + { + "name": "entity.name.type.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "captures": { + "0": { + "patterns": [ + { + "include": "#module_name_prefix" + }, + { + "name": "entity.other.inherited-class.prelude.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(Applicative|Bounded|Enum|Eq|Floating|Foldable|Fractional|Functor|Integral|Monad|Monoid|Num|Ord|Read|Real|RealFloat|RealFrac|Show|Traversable)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" + }, + { + "name": "support.class.prelude.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(Either|FilePath|IO|IOError|Integer|Maybe|Ordering|Rational|ReadS|ShowS|String|Bool|Char|Double|Float|Int|Word)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" + } + ] + } + } + } + ] + }, + "type_ctor": { + "patterns": [ + { + "name": "entity.name.tag.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "captures": { + "0": { + "patterns": [ + { + "include": "#module_name_prefix" + }, + { + "name": "support.tag.prelude.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(EQ|GT|Just|LT|Left|Nothing|Right|True|False)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" + } + ] + } + } + } + ] + }, + "where": { + "patterns": [ + { + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))where(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "name": "keyword.other.haskell" + } + ] + }, + "family_and_instance": { + "patterns": [ + { + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(family|instance)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))", + "name": "keyword.other.haskell" + } + ] + }, + "invalid": { + "patterns": [ + { + "match": "\\S+", + "name": "invalid.illegal.character-not-allowed-here.haskell" + } + ] + }, + "function_name": { + "patterns": [ + { + "name": "entity.name.function.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" + } + ] + }, + "assignment_op": { + "patterns": [ + { + "match": "=", + "captures": { + "0": { + "name": "keyword.operator.assignment.haskell" + } + } + } + ] + }, + "attribute_name": { + "patterns": [ + { + "name": "entity.other.attribute-name.haskell", + "match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}]))(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))" + } + ] } }, - "scopeName": "source.haskell", - "uuid": "5C034675-1F6D-497E-8073-369D37E2FD7D" + "patterns": [ + { + "name": "block.liquidhaskell.haskell", + "contentName": "block.liquidhaskell.annotation.haskell", + "begin": "\\{-@(?!#)", + "end": "@-\\}", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "name": "comment.line.shebang.haskell", + "match": "^\\#\\!.*\\brunhaskell\\b.*$" + }, + { + "include": "#infix_function" + }, + { + "include": "#unit" + }, + { + "include": "#empty_list" + }, + { + "include": "#quasi_quotes" + }, + { + "include": "#module_decl" + }, + { + "include": "#class_decl" + }, + { + "include": "#instance_decl" + }, + { + "include": "#foreign_import" + }, + { + "include": "#regular_import" + }, + { + "include": "#data_decl" + }, + { + "include": "#type_alias" + }, + { + "include": "#keywords" + }, + { + "include": "#c_preprocessor" + }, + { + "include": "#pragma" + }, + { + "include": "#string" + }, + { + "include": "#newline_escape" + }, + { + "include": "#quoted_character" + }, + { + "include": "#scoped_type_override" + }, + { + "include": "#function_type_declaration" + }, + { + "include": "#scoped_type" + }, + { + "include": "#comments" + }, + { + "include": "#infix_op" + }, + { + "include": "#comma" + }, + { + "include": "#lit_num" + }, + { + "include": "#operator" + }, + { + "include": "#identifier" + }, + { + "include": "#type_ctor" + } + ] } \ No newline at end of file