2017-03-21 21:55:22 +03:00
|
|
|
filetype: haskell
|
|
|
|
|
2017-03-21 22:07:39 +03:00
|
|
|
detect:
|
2017-03-21 21:55:22 +03:00
|
|
|
filename: "\\.hs$"
|
|
|
|
|
|
|
|
rules:
|
2017-03-21 22:07:39 +03:00
|
|
|
# Keywords
|
2020-06-27 00:53:43 +03:00
|
|
|
- statement: "\\b(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)\\b"
|
2017-03-21 22:07:39 +03:00
|
|
|
|
|
|
|
# Various symbols
|
2017-03-21 21:55:22 +03:00
|
|
|
- symbol: "(\\||@|!|:|_|~|=|\\\\|;|\\(\\)|,|\\[|\\]|\\{|\\})"
|
2017-03-21 22:07:39 +03:00
|
|
|
|
|
|
|
# Operators
|
2017-03-21 21:55:22 +03:00
|
|
|
- symbol.operator: "(==|/=|&&|\\|\\||<|>|<=|>=)"
|
2017-03-21 22:07:39 +03:00
|
|
|
|
|
|
|
# Various symbols
|
2017-03-21 21:55:22 +03:00
|
|
|
- special: "(->|<-)"
|
|
|
|
- symbol: "\\.|\\$"
|
2017-03-21 22:07:39 +03:00
|
|
|
|
|
|
|
# Data constructors
|
2017-03-21 21:55:22 +03:00
|
|
|
- constant.bool: "\\b(True|False)\\b"
|
2020-02-12 03:13:36 +03:00
|
|
|
- constant: "\\b(Nothing|Just|Left|Right|LT|EQ|GT)\\b"
|
2017-03-21 22:07:39 +03:00
|
|
|
|
|
|
|
# Data classes
|
2020-02-12 03:13:36 +03:00
|
|
|
- identifier.class: "\\b(Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor|Foldable|Additive|Zip)[ ]"
|
2017-03-21 22:07:39 +03:00
|
|
|
|
|
|
|
# Strings
|
|
|
|
- constant.string:
|
|
|
|
start: "\""
|
2017-03-28 03:53:08 +03:00
|
|
|
end: "\""
|
2017-03-29 16:45:16 +03:00
|
|
|
skip: "\\\\."
|
2017-03-21 22:07:39 +03:00
|
|
|
rules:
|
|
|
|
- constant.specialChar: "\\\\."
|
|
|
|
|
|
|
|
# Comments
|
|
|
|
- comment:
|
|
|
|
start: "--"
|
|
|
|
end: "$"
|
|
|
|
rules:
|
|
|
|
- todo: "(TODO|XXX|FIXME):?"
|
|
|
|
|
2017-03-21 21:55:22 +03:00
|
|
|
- comment:
|
|
|
|
start: "\\{-"
|
|
|
|
end: "-\\}"
|
2017-03-21 22:07:39 +03:00
|
|
|
rules:
|
|
|
|
- todo: "(TODO|XXX|FIXME):?"
|
2017-03-21 21:55:22 +03:00
|
|
|
|
|
|
|
- identifier.micro: "undefined"
|