haskell / haskell-mode

Emacs mode for Haskell
http://haskell.github.io/haskell-mode/
GNU General Public License v3.0
1.33k stars 342 forks source link

Syntax highlighting confused by lack of spaces #1783

Open aberent opened 2 years ago

aberent commented 2 years ago

If I have the following code in a file:

bad xs = [x|x <- xs]
good xs = [ x | x <- xs] 

the syntax highlighting gives up after the first '[x'.

If I remove or comment out 'bad' then it highlights correctly.

purcell commented 2 years ago

Presumably related to TemplateHaskell using the [quoter| ...|] syntax. You should prefer the good syntax above for list comprehensions.