micro
micro copied to clipboard
Improve Haskell syntax highlighting
Various improvements and fixes to the Haskell syntax:
- Better highlighting of operators (including user-defined ones)
- Highlight
SomeType
andT.SomeType
as type butT.someFunction
using default color. Capitalized identifiers in Haskell can be module names, type classes, types, or type/data constructors. Micro's syntax highlighting is not powerful enough to properly distinguish between these but I found usingtype
for all of them a reasonable compromise. - Add highlighting for unit instance (
()
) and numeric literals (int/float/octal/hexadecimal) - Improve highlighting for escape sequences in strings
- Remove
as
from the list of keywords because it only works like a keyword in the context ofimport ... as ...
, and it is very commonly used as an identifier - Add highlighting for infix function application (eg.
5 `div` 3
) - Add highlighting for SemiGroup / Applicative / Monoid type classes