| 1 | ## Haskell syntax highlighting |
| 2 | ## found here: http://www.wubutu.com/2011/05/syntax-highlighting-nano-ban.html |
| 3 | |
| 4 | syntax "haskell" "\.hs$" |
| 5 | |
| 6 | ## language words |
| 7 | color red "[ ](as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix|infixl|infixr|instance|let|in|mdo|module|newtype|qualified|type|where)[ ]" |
| 8 | color red "(^data|^foreign|^import|^infix|^infixl|^infixr|^instance|^module|^newtype|^type)[ ]" |
| 9 | color red "[ ](as$|case$|of$|class$|data$|default$|deriving$|do$|forall$|foreign$|hiding$|if$|then$|else$|import$|infix$|infixl$|infixr$|instance$|let$|in$|mdo$|module$|newtype$|qualified$|type$|where$)" |
| 10 | |
| 11 | ## lang symbols |
| 12 | color cyan "(\||@|!|:|_|~|=|\\|;|\(\)|,|\[|\]|\{|\})" |
| 13 | |
| 14 | ## lang operators |
| 15 | color magenta "(==|/=|&&|\|\||<|>|<=|>=)" |
| 16 | |
| 17 | ## lang symbols |
| 18 | color cyan "(->|<-)" |
| 19 | color magenta "\.|\$" |
| 20 | |
| 21 | ## data constructors |
| 22 | color magenta "(True|False|Nothing|Just|Left|Right|LT|EQ|GT)" |
| 23 | |
| 24 | ## data classes |
| 25 | color magenta "[ ](Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor)" |
| 26 | |
| 27 | ## strings |
| 28 | color yellow ""[^\"]*"" |
| 29 | |
| 30 | ## Comment highlighting |
| 31 | color green "--.*" |
| 32 | color green start="\{-" end="-\}" |
| 33 | |
| 34 | ## misc |
| 35 | color brightred "undefined" |