-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Haskell - highlighting of instance declaration following class declaration #1880
Comments
This is similar to #1320. I have a patch written and will open a pull request when I'm done with the test cases. I don't think the curly braces affect the highlighting because they're ignored by the syntax file. The issue occurs because the context responsible for highlighting type signatures is not always popped when it should be. |
…guard or an instance declaration. (#1885) * Pop type signature context when the indentation is less than or equal to that of the function declaration. * Add tests for #1320 and #1880. * Don't pop type signature context when encountering a comment or a line with only whitespace. * Update tests for #1320 and #1880.
This PR proposes to close some already fixed issues, which were not (correctly) referenced in the fixing pull requests. Closes sublimehq#442 Closes sublimehq#685 Closes sublimehq#691 (invalid) Closes sublimehq#795 Closes sublimehq#807 Closes sublimehq#903 Closes sublimehq#1141 Closes sublimehq#1172 Closes sublimehq#1245 Closes sublimehq#1257 Closes sublimehq#1286 Closes sublimehq#1320 Closes sublimehq#1357 Closes sublimehq#1382 (wontfix) Closes sublimehq#1403 Closes sublimehq#1451 Closes sublimehq#1453 (maybe) Closes sublimehq#1472 Closes sublimehq#1495 Closes sublimehq#1540 Closes sublimehq#1542 Closes sublimehq#1565 Closes sublimehq#1576 Closes sublimehq#1625 Closes sublimehq#1880 Closes sublimehq#1898 Closes sublimehq#1940 (invalid)
This issue has been solved by a previous commit, hence it is being closed. |
…guard or an instance declaration. (sublimehq#1885) * Pop type signature context when the indentation is less than or equal to that of the function declaration. * Add tests for sublimehq#1320 and sublimehq#1880. * Don't pop type signature context when encountering a comment or a line with only whitespace. * Update tests for sublimehq#1320 and sublimehq#1880.
Description
I found some strange behavior in Sublime's Haskell highlighting. The relevant code is from the Learn You A Haskell book, specifically the paragraph called "A yes-no typeclass".
In the second code block, immediately following the typeclass declaration, the words
instance
andwhere
do not highlight. This is irrespective of the order of the instance declarations. If I swap the instance declarations, the same thing happens, and additionally the expression[]
does not highlight.Oddly, this highlights as expected:
as does
but not if I break the line after the left brace.
It highlights as expected in gedit. See the images below.
Environment
The text was updated successfully, but these errors were encountered: