Skip to content

Conversation

@Andriamanitra
Copy link
Contributor

Various improvements and fixes to the Haskell syntax:

  • Better highlighting of operators (including user-defined ones)
  • Highlight SomeType and T.SomeType as type but T.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 using type 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 of import ... 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

screenshot showing the difference to current syntax highlighting

@JoeKar
Copy link
Collaborator

JoeKar commented Aug 19, 2024

Hard to review, especially as no Haskell expert nor user. 😅

@JoeKar JoeKar merged commit cc67b80 into zyedidia:master Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants