Skip to content
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

Types incorrectly highlighted as values #133

Closed
sheaf opened this issue Apr 28, 2020 · 4 comments
Closed

Types incorrectly highlighted as values #133

sheaf opened this issue Apr 28, 2020 · 4 comments
Labels

Comments

@sheaf
Copy link
Collaborator

sheaf commented Apr 28, 2020

Here are a few constructs that incorrectly highlight types as values:

types_highlighted_as_values

It should be a case of including the appropriate type highlighting pattern, e.g. fun_decl for the foreign import/export statements.

@sheaf
Copy link
Collaborator Author

sheaf commented May 1, 2020

Some more issues are demonstrated in the TypeSigs test case:

typesig_issues

I think there was also a regression for multi-line type signatures. I understand the limitation with lookahead over multiple lines, but at the least the part after the type signature used to be highlighted correctly:

multiline_typesig

(This is part of the MultiLineTypeSignatures test case.)

@elldritch
Copy link

Type signatures with more than one space between the name and double-colon also do not highly properly. For example, this will highlight correctly:

data Foo = Foo {
  someField :: Int,
  anotherField :: String
}

But this will not:

data Foo = Foo {
  someField    :: Int,
  anotherField :: String
}

@sheaf
Copy link
Collaborator Author

sheaf commented May 5, 2020

@liftM The problem with record fields has since been addressed, see #118.

As for the issues raised in the OP, the foreign import/export and data family issues have been resolved by 07c4883 and b39c52a respectively, with the remaining issue surrounding type families near the top of my todo list. After that we should be in a good position to cut a new release.

@sheaf
Copy link
Collaborator Author

sheaf commented May 6, 2020

Fixed remaining issues involving type familes in 7217f36.

@sheaf sheaf closed this as completed May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants