PureScript: Made `∀` a keyword (alias for `forall`) (#3005)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
diff --git a/components/prism-purescript.js b/components/prism-purescript.js
index 02cdaaa..9abff50 100644
--- a/components/prism-purescript.js
+++ b/components/prism-purescript.js
@@ -1,5 +1,5 @@
Prism.languages.purescript = Prism.languages.extend('haskell', {
- 'keyword': /\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,
+ 'keyword': /\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|∀/,
'import-statement': {
// The imported or hidden names are not included in this import
diff --git a/components/prism-purescript.min.js b/components/prism-purescript.min.js
index 04fc4ed..afa4957 100644
--- a/components/prism-purescript.min.js
+++ b/components/prism-purescript.min.js
@@ -1 +1 @@
-Prism.languages.purescript=Prism.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:import|as|hiding)\b/}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/}),Prism.languages.purs=Prism.languages.purescript;
\ No newline at end of file
+Prism.languages.purescript=Prism.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|∀/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:import|as|hiding)\b/}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/}),Prism.languages.purs=Prism.languages.purescript;
\ No newline at end of file
diff --git a/tests/languages/purescript/keyword_feature.test b/tests/languages/purescript/keyword_feature.test
index 339da63..3d47c6b 100644
--- a/tests/languages/purescript/keyword_feature.test
+++ b/tests/languages/purescript/keyword_feature.test
@@ -18,30 +18,32 @@ primitive
then
type
where
+∀
----------------------------------------------------
[
- ["keyword", "ado"],
- ["keyword", "case"],
- ["keyword", "class"],
- ["keyword", "data"],
- ["keyword", "derive"],
- ["keyword", "do"],
- ["keyword", "else"],
- ["keyword", "if"],
- ["keyword", "in"],
- ["keyword", "infixl"],
- ["keyword", "infixr"],
- ["keyword", "instance"],
- ["keyword", "let"],
- ["keyword", "module"],
- ["keyword", "newtype"],
- ["keyword", "of"],
- ["keyword", "primitive"],
- ["keyword", "then"],
- ["keyword", "type"],
- ["keyword", "where"]
+ ["keyword", "ado"],
+ ["keyword", "case"],
+ ["keyword", "class"],
+ ["keyword", "data"],
+ ["keyword", "derive"],
+ ["keyword", "do"],
+ ["keyword", "else"],
+ ["keyword", "if"],
+ ["keyword", "in"],
+ ["keyword", "infixl"],
+ ["keyword", "infixr"],
+ ["keyword", "instance"],
+ ["keyword", "let"],
+ ["keyword", "module"],
+ ["keyword", "newtype"],
+ ["keyword", "of"],
+ ["keyword", "primitive"],
+ ["keyword", "then"],
+ ["keyword", "type"],
+ ["keyword", "where"],
+ ["keyword", "∀"]
]
----------------------------------------------------