{"name":"PureScript","scopeName":"source.purescript","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":"^\\s*\\b(module)(?!')\\b","end":"(where)","patterns":[{"include":"#comments"},{"include":"#module_name"},{"include":"#module_exports"},{"name":"invalid.purescript","match":"[a-z]+"}],"beginCaptures":{"1":{"name":"keyword.other.purescript"}},"endCaptures":{"1":{"name":"keyword.other.purescript"}}},{"name":"meta.declaration.typeclass.purescript","begin":"^\\s*\\b(class)(?!')\\b","end":"\\b(where)\\b|$","patterns":[{"include":"#type_signature"}],"beginCaptures":{"1":{"name":"storage.type.class.purescript"}},"endCaptures":{"1":{"name":"keyword.other.purescript"}}},{"name":"meta.declaration.instance.purescript","contentName":"meta.type-signature.purescript","begin":"^\\s*\\b(else\\s+)?(derive\\s+)?(newtype\\s+)?(instance)(?!')\\b","end":"\\b(where)\\b|$","patterns":[{"include":"#type_signature"}],"beginCaptures":{"1":{"name":"keyword.other.purescript"},"2":{"name":"keyword.other.purescript"},"3":{"name":"keyword.other.purescript"},"4":{"name":"keyword.other.purescript"}},"endCaptures":{"1":{"name":"keyword.other.purescript"}}},{"name":"meta.foreign.data.purescript","contentName":"meta.kind-signature.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]*$)","patterns":[{"include":"#double_colon"},{"include":"#kind_signature"}],"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"}}},{"name":"meta.foreign.purescript","contentName":"meta.type-signature.purescript","begin":"^(\\s*)(foreign)\\s+(import)\\s+([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)","end":"^(?!\\1[ \\t]|[ \\t]*$)","patterns":[{"include":"#double_colon"},{"include":"#type_signature"}],"beginCaptures":{"2":{"name":"keyword.other.purescript"},"3":{"name":"keyword.other.purescript"},"4":{"name":"entity.name.function.purescript"}}},{"name":"meta.import.purescript","begin":"^\\s*\\b(import)(?!')\\b","end":"($|(?=--))","patterns":[{"include":"#module_name"},{"include":"#module_exports"},{"match":"\\b(as|hiding)\\b","captures":{"1":{"name":"keyword.other.purescript"}}}],"beginCaptures":{"1":{"name":"keyword.other.purescript"}}},{"name":"meta.declaration.type.data.purescript","begin":"^(\\s)*(data|newtype)\\s+(.+?)\\s*(?=\\=|$)","end":"^(?!\\1[ \\t]|[ \\t]*$)","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+)(?:(?\u003cctorArgs\u003e(?:(?:[\\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()'→⇒\\[\\],]|-\u003e|=\u003e)+\\s*)+))(?:\\s*(?:\\s+)\\s*\\g\u003cctorArgs\u003e)?)?))","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"}],"beginCaptures":{"2":{"name":"storage.type.data.purescript"},"3":{"name":"meta.type-signature.purescript","patterns":[{"include":"#type_signature"}]}}},{"name":"meta.declaration.type.type.purescript","contentName":"meta.type-signature.purescript","begin":"^(\\s)*(type)\\s+(.+?)\\s*(?=\\=|$)","end":"^(?!\\1[ \\t]|[ \\t]*$)","patterns":[{"match":"=","captures":{"0":{"name":"keyword.operator.assignment.purescript"}}},{"include":"#type_signature"},{"include":"#record_types"},{"include":"#comments"}],"beginCaptures":{"2":{"name":"storage.type.data.purescript"},"3":{"name":"meta.type-signature.purescript","patterns":[{"include":"#type_signature"}]}}},{"name":"keyword.other.purescript","match":"^\\s*\\b(derive|where|data|type|newtype|infix[lr]?|foreign(\\s+import)?(\\s+data)?)(?!')\\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":"^\\s*\\b(data|type|newtype)(?!')\\b"},{"name":"keyword.control.purescript","match":"\\b(do|ado|if|then|else|case|of|let|in)(?!('|\\s*(:|=)))\\b"},{"name":"constant.numeric.hex.purescript","match":"\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)"},{"name":"constant.numeric.decimal.purescript","match":"(?x)\n(?\u003c!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)","captures":{"0":{"name":"constant.numeric.decimal.purescript"},"1":{"name":"meta.delimiter.decimal.period.purescript"},"2":{"name":"meta.delimiter.decimal.period.purescript"},"3":{"name":"meta.delimiter.decimal.period.purescript"},"4":{"name":"meta.delimiter.decimal.period.purescript"},"5":{"name":"meta.delimiter.decimal.period.purescript"},"6":{"name":"meta.delimiter.decimal.period.purescript"}}},{"name":"constant.language.boolean.purescript","match":"\\b(true|false)\\b"},{"name":"constant.numeric.purescript","match":"\\b(([0-9]+_?)*[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":"\"","patterns":[{"include":"#characters"},{"begin":"\\\\\\s","end":"\\\\","patterns":[{"name":"invalid.illegal.character-not-allowed-here.purescript","match":"\\S+"}],"beginCaptures":{"0":{"name":"markup.other.escape.newline.begin.purescript"}},"endCaptures":{"0":{"name":"markup.other.escape.newline.end.purescript"}}}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.purescript"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.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\\\\\\\"'\\\u0026]))|(\\\\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":"\\((?\u003cparen\u003e(?:[^()]|\\(\\g\u003cparen\u003e\\))*)(::|∷)(?\u003cparen2\u003e(?:[^()]|\\(\\g\u003cparen2\u003e\\))*)\\)","captures":{"1":{"patterns":[{"include":"$self"}]},"2":{"name":"keyword.other.double-colon.purescript"},"3":{"name":"meta.type-signature.purescript","patterns":[{"include":"#type_signature"}]}}},{"begin":"^(\\s*)(?:(::|∷))","end":"^(?!\\1[ \\t]*|[ \\t]*$)","patterns":[{"include":"#type_signature"}],"beginCaptures":{"2":{"name":"keyword.other.double-colon.purescript"}}},{"include":"#data_ctor"},{"include":"#comments"},{"include":"#infix_op"},{"name":"keyword.other.arrow.purescript","match":"\\\u003c-|-\\\u003e"},{"name":"keyword.operator.purescript","match":"[\\p{S}\\p{P}\u0026\u0026[^(),;\\[\\]`{}_\"']]+"},{"name":"punctuation.separator.comma.purescript","match":","}],"repository":{"block_comment":{"patterns":[{"name":"comment.block.documentation.purescript","begin":"\\{-\\s*\\|","end":"-\\}","patterns":[{"include":"#block_comment"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.documentation.purescript"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.documentation.purescript"}},"applyEndPatternLast":true},{"name":"comment.block.purescript","begin":"\\{-","end":"-\\}","patterns":[{"include":"#block_comment"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.purescript"}},"applyEndPatternLast":true}]},"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\\\\\\\"'\\\u0026]))|(\\\\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"}}}]},"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+)(?:(?\u003cclassConstraint\u003e(?:[\\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\u003cclassConstraint\u003e)?)))","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"}]}}}]},"comments":{"patterns":[{"begin":"(^[ \\t]+)?(?=--+\\s+\\|)","end":"(?!\\G)","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"}}}],"beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.purescript"}}},{"begin":"(^[ \\t]+)?(?=--+(?![\\p{S}\\p{P}\u0026\u0026[^(),;\\[\\]`{}_\"']]))","end":"(?!\\G)","patterns":[{"name":"comment.line.double-dash.purescript","begin":"--","end":"\\n","beginCaptures":{"0":{"name":"punctuation.definition.comment.purescript"}}}],"beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.purescript"}}},{"include":"#block_comment"}]},"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}']*)*"}]},"double_colon":{"patterns":[{"name":"keyword.other.double-colon.purescript","match":"(?:::|∷)"}]},"function_type_declaration":{"patterns":[{"name":"meta.function.type-declaration.purescript","contentName":"meta.type-signature.purescript","begin":"^(\\s*)([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)\\s*(?:(::|∷)(?!.*\u003c-))","end":"^(?!\\1[ \\t]|[ \\t]*$)","patterns":[{"include":"#double_colon"},{"include":"#type_signature"}],"beginCaptures":{"2":{"name":"entity.name.function.purescript"},"3":{"name":"keyword.other.double-colon.purescript"}}}]},"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}']*"}]},"infix_op":{"patterns":[{"name":"entity.name.function.infix.purescript","match":"(?:\\((?!--+\\))[\\p{S}\\p{P}\u0026\u0026[^(),;\\[\\]`{}_\"']]+\\))"}]},"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":"-\u003e|→"}]},"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}']*)*\\.?"}]},"record_field_declaration":{"patterns":[{"name":"meta.record-field.type-declaration.purescript","contentName":"meta.type-signature.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*(::|∷)|})","patterns":[{"include":"#type_signature"},{"include":"#record_types"}],"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"}}}]},"record_types":{"patterns":[{"name":"meta.type.record.purescript","begin":"\\{","end":"\\}","patterns":[{"name":"punctuation.separator.comma.purescript","match":","},{"include":"#record_field_declaration"},{"include":"#comments"}],"beginCaptures":{"0":{"name":"keyword.operator.type.record.begin.purescript"}},"endCaptures":{"0":{"name":"keyword.operator.type.record.end.purescript"}}}]},"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}']*)*"}]},"type_signature":{"patterns":[{"name":"meta.class-constraints.purescript","match":"(?:(?:\\()(?:(?\u003cclassConstraints\u003e(?:(?:(?:([\\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+)(?:(?\u003cclassConstraint\u003e(?:[\\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\u003cclassConstraint\u003e)?))))(?:\\s*(?:,)\\s*\\g\u003cclassConstraints\u003e)?))(?:\\))(?:\\s*(=\u003e|\u003c=|⇐|⇒)))","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+)(?:(?\u003cclassConstraint\u003e(?:[\\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\u003cclassConstraint\u003e)?))))\\s*(=\u003e|\u003c=|⇐|⇒)","captures":{"1":{"patterns":[{"include":"#class_constraint"}]},"4":{"name":"keyword.other.big-arrow.purescript"}}},{"name":"keyword.other.arrow.purescript","match":"-\u003e|→"},{"name":"keyword.other.big-arrow.purescript","match":"=\u003e|⇒"},{"name":"keyword.other.big-arrow-left.purescript","match":"\u003c=|⇐"},{"name":"keyword.other.forall.purescript","match":"forall|∀"},{"include":"#generic_type"},{"include":"#type_name"},{"include":"#comments"}]}}}