public

Sublimetext: highlight unicode Haskell syntax

  • Download Gist
sublimetext-haskell-unicode.patch
Diff
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
--- /tmp/Haskell.tmLanguage 2012-09-18 19:30:45.887203348 +0200
+++ .config/sublime-text-2/Packages/Haskell/Haskell.tmLanguage 2012-09-18 20:10:23.314992379 +0200
@@ -370,7 +370,7 @@
</dict>
<dict>
<key>begin</key>
- <string>^\s*([a-z_][a-zA-Z0-9_']*|\([|!%$+\-.,=&lt;/&gt;]+\))\s*(::)</string>
+ <string>^\s*([a-z_][a-zA-Z0-9_']*|\([|!%$+\-.,=&lt;/&gt;]+\))\s*(::|∷)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@@ -426,7 +426,7 @@
<key>comment</key>
<string>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 $%^&amp;*.</string>
<key>match</key>
- <string>[|!%$?~+:\-.=&lt;/&gt;\\]+</string>
+ <string>([|!%$?~+:\-.=&lt;/&gt;\\]+|[↢↣⤛⤜★←→∷])</string>
<key>name</key>
<string>keyword.operator.haskell</string>
</dict>
@@ -587,7 +587,7 @@
</dict>
</dict>
<key>match</key>
- <string>\(\s*([A-Z][A-Za-z]*)\s+([a-z][A-Za-z_']*)\)\s*(=&gt;)</string>
+ <string>\(\s*([A-Z][A-Za-z]*)\s+([a-z][A-Za-z_']*)\)\s*(=&gt;|⇒)</string>
<key>name</key>
<string>meta.class-constraint.haskell</string>
</dict>
@@ -597,13 +597,13 @@
</dict>
<dict>
<key>match</key>
- <string>-&gt;</string>
+ <string>(-&gt;|→)</string>
<key>name</key>
<string>keyword.other.arrow.haskell</string>
</dict>
<dict>
<key>match</key>
- <string>=&gt;</string>
+ <string>(=&gt;|⇒)</string>
<key>name</key>
<string>keyword.other.big-arrow.haskell</string>
</dict>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.