{ "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": "(?\\((?:[^()]?|\\g)*\\)))|('?(?\\((?:[^]\\[]?|\\g)*])))\\s*(?:(?|⇒)(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])" }, "cpp": { "captures": { "1": { "name": "punctuation.definition.preprocessor.c" } }, "match": "^(#).*$", "name": "meta.preprocessor.c" }, "data_constructor": { "match": "\\b(?|→)", "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": "^(\\s*)(?(?:[_\\p{Ll}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*#*|\\(\\s*(?!--+\\))[[\\p{S}\\p{P}]&&[^]\"'(),:;\\[_`{}]][[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]]*\\s*\\))(?:\\s*,\\s*\\g)?)\\s*(?[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*(\\.\\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": "(?|→)|(-<|↢)|(-<<|⤛)|(>-|⤚)|(>>-|⤜)|(∀))(?![[\\p{S}\\p{P}]&&[^]\"'(),;\\[_`{}]])" }, { "captures": { "1": { "name": "keyword.operator.postfix.hash.haskell" } }, "match": "(?<=[[_\\p{Ll}\\p{Lu}\\p{Lt}\\d\\p{S}\\p{P}]&&[^#,;\\[`{]])(#+)(?![[_\\p{Ll}\\p{Lu}\\p{Lt}\\d\\p{S}\\p{P}]&&[^]),;`}]])" }, { "captures": { "1": { "name": "keyword.operator.infix.tight.at.haskell" } }, "match": "(?<=[])_}\\p{Ll}\\p{Lu}\\p{Lt}\\d])(@)(?=[(\\[_{\\p{Ll}\\p{Lu}\\p{Lt}\\d])" }, { "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": "(?|⇒", "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(?