Skip to content

Fix typo on declaration #38

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

Closed
wants to merge 1 commit into from
Closed

Conversation

jgoux
Copy link

@jgoux jgoux commented Mar 22, 2017

I just saw that this file was used by the VS Code purescript-language extension for the grammar.
Maybe this will fix the issue with record highlighting ?

image

I just saw that this file was used by the VS Code purescript-language extension for the grammar.
Maybe this will fix the issue with record highlighting ?
@nwolverson
Copy link
Contributor

This doesn't look wrong (other than the change is in a generated file), but won't fix your issue I think. This is the highlighting I see in atom:

image

And these are the scopes of "foo" in each case:
image

As you can see the newtype has a couple of "record" while the other doesn't. I guess all this is because Haskell records declarations give special meaning to the record fields, while really they are just any other type in PureScript. So Int -> { foo:: Int } should render the label the same.

newtype Foo = Foo
  { foo  String
  , bar  Array String
  }

type Foo =
  { foo  String
  , bar  Array String
  }

foo :: Int -> { foo :: String }

I think i propose highlighting records everywhere the way they now appear in the data/newtype declarations, starting looking at this.

@nwolverson
Copy link
Contributor

Fixed via 955b632

@nwolverson nwolverson closed this Sep 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants