{ "fileTypes": [ "purs" ], "name": "PureScript", "scopeName": "source.purescript", "macros": { "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}&&[^(),;\\[\\]`{}_\"']]+\\))", "character": "(?:[ -\\[\\]-~]|(\\\\(?: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@\\[\\]\\\\\\^_]))", "classConstraint": "(?:(?:([\\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+)(?:(?(?:[\\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}']*)(?:\\s*(?:\\s+)\\s*\\g)?)))", "functionTypeDeclaration": "([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(::|∷)", "ctorArgs": "(?:[\\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}']*|(?:(?:[\\w()'→⇒\\[\\],]|->|=>)+\\s*)+)", "ctor": "(?:(?:\\b([\\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+)(?:(?(?:(?:[\\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}']*|(?:(?:[\\w()'→⇒\\[\\],]|->|=>)+\\s*)+))(?:\\s*(?:\\s+)\\s*\\g)?)?))", "typeDecl": ".+?", "indentChar": "[ \\t]", "indentBlockEnd": "^(?!\\1[ \\t]|[ \\t]*$)", "maybeBirdTrack": "^" }, "patterns": [ { "name": "keyword.operator.function.infix.purescript", "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.purescript" }, "2": { "name": "punctuation.definition.entity.purescript" } } }, { "name": "meta.declaration.module.purescript", "begin": "\\b(module)(?!')\\b", "end": "(where)", "beginCaptures": { "1": { "name": "keyword.other.purescript" } }, "endCaptures": { "1": { "name": "keyword.other.purescript" } }, "patterns": [ { "include": "#comments" }, { "include": "#module_name" }, { "include": "#module_exports" }, { "name": "invalid.purescript", "match": "[a-z]+" } ] }, { "name": "meta.declaration.typeclass.purescript", "begin": "\\b(class)(?!')\\b", "end": "\\b(where)\\b|$", "beginCaptures": { "1": { "name": "storage.type.class.purescript" } }, "endCaptures": { "1": { "name": "keyword.other.purescript" } }, "patterns": [ { "include": "#type_signature" } ] }, { "name": "meta.declaration.instance.purescript", "begin": "\\b(instance)(?!')\\b", "end": "\\b(where)\\b|$", "contentName": "meta.type-signature.purescript", "beginCaptures": { "1": { "name": "keyword.other.purescript" } }, "endCaptures": { "1": { "name": "keyword.other.purescript" } }, "patterns": [ { "include": "#type_signature" } ] }, { "name": "meta.foreign.data.purescript", "begin": "^(\\s*)(foreign)\\s+(import)\\s+(data)\\s+([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)", "end": "^(?!\\1[ \\t]|[ \\t]*$)", "contentName": "meta.kind-signature.purescript", "beginCaptures": { "2": { "name": "keyword.other.purescript" }, "3": { "name": "keyword.other.purescript" }, "4": { "name": "keyword.other.purescript" }, "5": { "name": "entity.name.type.purescript" }, "6": { "name": "keyword.other.double-colon.purescript" } }, "patterns": [ { "include": "#double_colon" }, { "include": "#kind_signature" } ] }, { "name": "meta.foreign.purescript", "begin": "^(\\s*)(foreign)\\s+(import)\\s+([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)", "end": "^(?!\\1[ \\t]|[ \\t]*$)", "contentName": "meta.type-signature.purescript", "beginCaptures": { "2": { "name": "keyword.other.purescript" }, "3": { "name": "keyword.other.purescript" }, "4": { "name": "entity.name.function.purescript" } }, "patterns": [ { "include": "#double_colon" }, { "include": "#type_signature" } ] }, { "name": "meta.import.purescript", "begin": "\\b(import)(?!')\\b", "end": "($|(?=--))", "beginCaptures": { "1": { "name": "keyword.other.purescript" } }, "patterns": [ { "include": "#module_name" }, { "include": "#module_exports" }, { "match": "\\b(as|hiding)\\b", "captures": { "1": { "name": "keyword.other.purescript" } } } ] }, { "name": "meta.declaration.type.data.purescript", "begin": "^(\\s)*(data|newtype)\\s+(.+?)\\s*(?=\\=|$)", "end": "^(?!\\1[ \\t]|[ \\t]*$)", "beginCaptures": { "2": { "name": "storage.type.data.purescript" }, "3": { "name": "meta.type-signature.purescript", "patterns": [ { "include": "#type_signature" } ] } }, "patterns": [ { "include": "#comments" }, { "match": "=", "captures": { "0": { "name": "keyword.operator.assignment.purescript" } } }, { "match": "(?:(?:\\b([\\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+)(?:(?(?:(?:[\\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}']*|(?:(?:[\\w()'→⇒\\[\\],]|->|=>)+\\s*)+))(?:\\s*(?:\\s+)\\s*\\g)?)?))", "captures": { "1": { "patterns": [ { "include": "#data_ctor" } ] }, "2": { "name": "meta.type-signature.purescript", "patterns": [ { "include": "#type_signature" } ] } } }, { "match": "\\|", "captures": { "0": { "name": "punctuation.separator.pipe.purescript" } } }, { "include": "#record_types" } ] }, { "name": "meta.declaration.type.type.purescript", "begin": "^(\\s)*(type)\\s+(.+?)\\s*(?=\\=|$)", "end": "^(?!\\1[ \\t]|[ \\t]*$)", "contentName": "meta.type-signature.purescript", "beginCaptures": { "2": { "name": "storage.type.data.purescript" }, "3": { "name": "meta.type-signature.purescript", "patterns": [ { "include": "#type_signature" } ] } }, "patterns": [ { "match": "=", "captures": { "0": { "name": "keyword.operator.assignment.purescript" } } }, { "include": "#type_signature" }, { "include": "#record_types" }, { "include": "#comments" } ] }, { "name": "keyword.other.purescript", "match": "\\b(derive|where|data|type|newtype|infix[lr]?|foreign)(?!')\\b" }, { "name": "entity.name.function.typed-hole.purescript", "match": "\\?(?:[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)" }, { "name": "storage.type.purescript", "match": "\\b(data|type|newtype)(?!')\\b" }, { "name": "keyword.control.purescript", "match": "\\b(do|if|then|else|case|of|let|in)(?!')\\b" }, { "name": "constant.numeric.float.purescript", "match": "\\b([0-9]+\\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b" }, { "name": "constant.language.boolean.purescript", "match": "\\b(true|false)\\b" }, { "name": "constant.numeric.purescript", "match": "\\b([0-9]+|0([xX][0-9a-fA-F]+|[oO][0-7]+))\\b" }, { "name": "string.quoted.triple.purescript", "begin": "\"\"\"", "end": "\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.purescript" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.purescript" } } }, { "name": "string.quoted.double.purescript", "begin": "\"", "end": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.purescript" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.purescript" } }, "patterns": [ { "include": "#characters" }, { "begin": "\\\\\\s", "end": "\\\\", "beginCaptures": { "0": { "name": "markup.other.escape.newline.begin.purescript" } }, "endCaptures": { "0": { "name": "markup.other.escape.newline.end.purescript" } }, "patterns": [ { "match": "\\S+", "name": "invalid.illegal.character-not-allowed-here.purescript" } ] } ] }, { "name": "markup.other.escape.newline.purescript", "match": "\\\\$" }, { "name": "string.quoted.single.purescript", "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": "punctuation.definition.string.begin.purescript" }, "2": { "patterns": [ { "include": "#characters" } ] }, "7": { "name": "punctuation.definition.string.end.purescript" } } }, { "include": "#function_type_declaration" }, { "match": "\\((?(?:[^()]|\\(\\g\\))*)(::|∷)(?(?:[^()]|\\(\\g\\))*)\\)", "captures": { "1": { "patterns": [ { "include": "$self" } ] }, "2": { "name": "keyword.other.double-colon.purescript" }, "3": { "name": "meta.type-signature.purescript", "patterns": [ { "include": "#type_signature" } ] } } }, { "begin": "^(\\s*)(?:(::|∷))", "beginCaptures": { "2": { "name": "keyword.other.double-colon.purescript" } }, "end": "^(?!\\1[ \\t]*|[ \\t]*$)", "patterns": [ { "include": "#type_signature" } ] }, { "include": "#data_ctor" }, { "include": "#comments" }, { "include": "#infix_op" }, { "name": "keyword.other.arrow.purescript", "match": "\\<-|-\\>" }, { "name": "keyword.operator.purescript", "match": "[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+" }, { "name": "punctuation.separator.comma.purescript", "match": "," } ], "repository": { "block_comment": { "patterns": [ { "name": "comment.block.documentation.purescript", "begin": "\\{-\\s*\\|", "end": "-\\}", "applyEndPatternLast": 1, "beginCaptures": { "0": { "name": "punctuation.definition.comment.documentation.purescript" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.documentation.purescript" } }, "patterns": [ { "include": "#block_comment" } ] }, { "name": "comment.block.purescript", "begin": "\\{-", "end": "-\\}", "applyEndPatternLast": 1, "beginCaptures": { "0": { "name": "punctuation.definition.comment.purescript" } }, "patterns": [ { "include": "#block_comment" } ] } ] }, "record_types": { "patterns": [ { "name": "meta.type.record.purescript", "begin": "\\{", "beginCaptures": { "0": { "name": "keyword.operator.type.record.begin.purescript" } }, "end": "\\}", "endCaptures": { "0": { "name": "keyword.operator.type.record.end.purescript" } }, "patterns": [ { "name": "punctuation.separator.comma.purescript", "match": "," }, { "include": "#record_field_declaration" }, { "include": "#comments" } ] } ] }, "comments": { "patterns": [ { "begin": "(^[ \\t]+)?(?=--+\\s+\\|)", "end": "(?!\\G)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.purescript" } }, "patterns": [ { "name": "comment.line.double-dash.documentation.purescript", "begin": "(--+)\\s+(\\|)", "end": "\\n", "beginCaptures": { "1": { "name": "punctuation.definition.comment.purescript" }, "2": { "name": "punctuation.definition.comment.documentation.purescript" } } } ] }, { "begin": "(^[ \\t]+)?(?=--+(?![\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]))", "end": "(?!\\G)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.purescript" } }, "patterns": [ { "name": "comment.line.double-dash.purescript", "begin": "--", "end": "\\n", "beginCaptures": { "0": { "name": "punctuation.definition.comment.purescript" } } } ] }, { "include": "#block_comment" } ] }, "characters": { "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\\\\\\\"'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))", "captures": { "1": { "name": "constant.character.escape.purescript" }, "2": { "name": "constant.character.escape.octal.purescript" }, "3": { "name": "constant.character.escape.hexadecimal.purescript" }, "4": { "name": "constant.character.escape.control.purescript" } } } ] }, "infix_op": { "patterns": [ { "name": "entity.name.function.infix.purescript", "match": "(?:\\((?!--+\\))[\\p{S}\\p{P}&&[^(),;\\[\\]`{}_\"']]+\\))" } ] }, "module_exports": { "patterns": [ { "name": "meta.declaration.exports.purescript", "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#comments" }, { "name": "entity.name.function.purescript", "match": "\\b(?:[\\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}']*" }, { "include": "#type_name" }, { "name": "punctuation.separator.comma.purescript", "match": "," }, { "include": "#infix_op" }, { "name": "meta.other.constructor-list.purescript", "match": "\\(.*?\\)" } ] } ] }, "module_name": { "patterns": [ { "name": "support.other.module.purescript", "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{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.?" } ] }, "function_type_declaration": { "patterns": [ { "name": "meta.function.type-declaration.purescript", "begin": "^(\\s*)([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(?:(::|∷)(?!.*<-))", "end": "^(?!\\1[ \\t]|[ \\t]*$)", "contentName": "meta.type-signature.purescript", "beginCaptures": { "2": { "name": "entity.name.function.purescript" }, "3": { "name": "keyword.other.double-colon.purescript" } }, "patterns": [ { "include": "#double_colon" }, { "include": "#type_signature" } ] } ] }, "record_field_declaration": { "patterns": [ { "name": "meta.record-field.type-declaration.purescript", "begin": "([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(::|∷)", "end": "(?=([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(::|∷)|})", "contentName": "meta.type-signature.purescript", "beginCaptures": { "1": { "patterns": [ { "name": "entity.other.attribute-name.purescript", "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}']*" } ] }, "2": { "name": "keyword.other.double-colon.purescript" } }, "patterns": [ { "include": "#type_signature" }, { "include": "#record_types" } ] } ] }, "kind_signature": { "patterns": [ { "name": "keyword.other.star.purescript", "match": "\\*" }, { "name": "keyword.other.exclaimation-point.purescript", "match": "!" }, { "name": "keyword.other.pound-sign.purescript", "match": "#" }, { "name": "keyword.other.arrow.purescript", "match": "->|→" } ] }, "type_signature": { "patterns": [ { "name": "meta.class-constraints.purescript", "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}']*)*)\\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{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}']*)(?:\\s*(?:\\s+)\\s*\\g)?))))(?:\\s*(?:,)\\s*\\g)?))(?:\\))(?:\\s*(=>|<=|⇐|⇒)))", "captures": { "1": { "patterns": [ { "include": "#class_constraint" } ] }, "4": { "name": "keyword.other.big-arrow.purescript" } } }, { "name": "meta.class-constraints.purescript", "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}']*)*)\\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{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}']*)(?:\\s*(?:\\s+)\\s*\\g)?))))\\s*(=>|<=|⇐|⇒)", "captures": { "1": { "patterns": [ { "include": "#class_constraint" } ] }, "4": { "name": "keyword.other.big-arrow.purescript" } } }, { "name": "keyword.other.arrow.purescript", "match": "->|→" }, { "name": "keyword.other.big-arrow.purescript", "match": "=>|⇒" }, { "name": "keyword.other.big-arrow-left.purescript", "match": "<=|⇐" }, { "name": "keyword.other.forall.purescript", "match": "forall|∀" }, { "include": "#generic_type" }, { "include": "#type_name" }, { "include": "#comments" } ] }, "type_name": { "patterns": [ { "name": "entity.name.type.purescript", "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*" } ] }, "data_ctor": { "patterns": [ { "name": "entity.name.tag.purescript", "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*" } ] }, "generic_type": { "patterns": [ { "name": "variable.other.generic-type.purescript", "match": "\\b(?:[\\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}']*" } ] }, "double_colon": { "patterns": [ { "name": "keyword.other.double-colon.purescript", "match": "(?:::|∷)" } ] }, "class_constraint": { "patterns": [ { "name": "meta.class-constraint.purescript", "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}']*)*)\\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{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}']*)(?:\\s*(?:\\s+)\\s*\\g)?)))", "captures": { "1": { "patterns": [ { "name": "entity.name.type.purescript", "match": "\\b[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*" } ] }, "2": { "patterns": [ { "include": "#type_name" }, { "include": "#generic_type" } ] } } } ] } } }