]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/haskell.yaml
Merge branch 'python-highlight-zero' of https://github.com/a11ce/micro into a11ce...
[micro.git] / runtime / syntax / haskell.yaml
1 filetype: haskell
2
3 detect:
4     filename: "\\.hs$"
5
6 rules:
7     # Keywords
8     - 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"
9
10       # Various symbols
11     - symbol: "(\\||@|!|:|_|~|=|\\\\|;|\\(\\)|,|\\[|\\]|\\{|\\})"
12
13       # Operators
14     - symbol.operator: "(==|/=|&&|\\|\\||<|>|<=|>=)"
15
16       # Various symbols
17     - special: "(->|<-)"
18     - symbol: "\\.|\\$"
19
20       # Data constructors
21     - constant.bool: "\\b(True|False)\\b"
22     - constant: "\\b(Nothing|Just|Left|Right|LT|EQ|GT)\\b"
23
24       # Data classes
25     - identifier.class: "\\b(Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor|Foldable|Additive|Zip)[ ]"
26
27       # Strings
28     - constant.string:
29         start: "\""
30         end: "\""
31         skip: "\\\\."
32         rules:
33             - constant.specialChar: "\\\\."
34
35       # Comments
36     - comment:
37         start: "--"
38         end: "$"
39         rules:
40             - todo: "(TODO|XXX|FIXME):?"
41
42     - comment:
43         start: "\\{-"
44         end: "-\\}"
45         rules:
46             - todo: "(TODO|XXX|FIXME):?"
47
48     - identifier.micro: "undefined"