syntax - Haskell Guards and SublimeText 3 -


i switched on sublime text 3 coding haskell in st3 noticed quite odd, syntax highlighting logic guards.

as can see, when write way, highlights first guard in white colour , different sign in mix of white/magenta:

correct guards, incorrect highlighting.

only when use wrong syntax (with equal sign after argument) displays correctly.

incorrect guards, correct highlighting.

does know how fix this?

you're using default haskell syntax highlighting. recommend disabling haskell package , installing sublimehaskell. syntax highlighting better, , recognizes things otherwise being "built-in" (it's prelude functions considered built-in).

if you're using built-in haskell highlighting, can check it's buggy using ctrlaltshiftp shortcut. highlight each guard pipe individually , hit shortcut. in status bar it'll briefly show syntax scope names associated region. first pipe, you'll source.haskell meta.function.type-declaration.haskell, , second you'll source.haskell keyword.operator.haskell. using sublimehaskell's syntax you'll source.haskell keyword.operator.haskell both pipes. won't sublimehaskell's perfect (try indenting entire file after module name where), it's better. since syntaxes have same name , because sublimehaskell comes snippets , whatnot cover built-in does, recommend disabling haskell plugin , leaving sublimehaskell's syntax selectable.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -