The first piped statement with a guard when not using an = (which isn't necessary) isn't coloured properly, and the the statement following it isn't coloured properly either.
The following is valid Haskell:
handleLookup :: Either String Code -> String
handleLookup x
| Either.isLeft x = "Issue: " ++ fromLeft x
| otherwise = "Code: " ++ fromRight x
but is highlighted like so:
whereas having an = after handleLookup x on line 2, styles it like so:
EDIT:
Seems to be a general issue that Sublime doesn't fully understand what can terminate a partial-statement:
Correct syntax, Incorrect highlighting:
Incorrect syntax, correct highlighting
Copied from original issue: SublimeTextIssues/Core#1024
From @Kasceh on November 16, 2015 12:36
The first piped statement with a guard when not using an
=
(which isn't necessary) isn't coloured properly, and the the statement following it isn't coloured properly either.The following is valid Haskell:
but is highlighted like so:
whereas having an
=
afterhandleLookup x
on line 2, styles it like so:EDIT:
Seems to be a general issue that Sublime doesn't fully understand what can terminate a partial-statement:
Correct syntax, Incorrect highlighting:
Incorrect syntax, correct highlighting
Copied from original issue: SublimeTextIssues/Core#1024