forked from zyedidia/micro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaskell.yaml
50 lines (39 loc) · 1.54 KB
/
haskell.yaml
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
filetype: haskell
detect:
filename: "\\.hs$"
rules:
# Keywords
- statement: "[ ](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)[ ]"
- statement: "(^data|^foreign|^import|^infix|^infixl|^infixr|^instance|^module|^newtype|^type)[ ]"
- statement: "[ ](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$)"
# Various symbols
- symbol: "(\\||@|!|:|_|~|=|\\\\|;|\\(\\)|,|\\[|\\]|\\{|\\})"
# Operators
- symbol.operator: "(==|/=|&&|\\|\\||<|>|<=|>=)"
# Various symbols
- special: "(->|<-)"
- symbol: "\\.|\\$"
# Data constructors
- constant.bool: "\\b(True|False)\\b"
- constant: "\\b(Nothing|Just|Left|Right|LT|EQ|GT)\\b"
# Data classes
- identifier.class: "\\b(Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor|Foldable|Additive|Zip)[ ]"
# Strings
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
# Comments
- comment:
start: "--"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "\\{-"
end: "-\\}"
rules:
- todo: "(TODO|XXX|FIXME):?"
- identifier.micro: "undefined"