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

Support record dot syntax #332

Open
andys8 opened this issue Dec 11, 2020 · 4 comments
Open

Support record dot syntax #332

andys8 opened this issue Dec 11, 2020 · 4 comments

Comments

@andys8
Copy link
Contributor

andys8 commented Dec 11, 2020

There is a proposal for record dot syntax and the preprocessor.

Although this is probably still early, support for the new syntax would be awesome. One thing I notices is the following:

brittany will take a field access and split it apart because it's parsed as function composition.

x = a.b
x = a . b

For this example, it might be enough to not add whitespaces in this case.

(regarding complete support, there might be more issues)

@tfausak
Copy link
Collaborator

tfausak commented Dec 11, 2020

This will almost certainly require support from ghc-exactprint before Brittany can do anything about it.

@mrkkrp
Copy link

mrkkrp commented Dec 11, 2020

You could check how Ormolu does this. Ormolu only depends on ghc-lib-parser.

@andys8
Copy link
Contributor Author

andys8 commented Apr 1, 2021

Record for syntax seems to land with GHC 9.2

@andys8
Copy link
Contributor Author

andys8 commented Aug 24, 2021

ghc-exactprint with support for GHC 9.2 RC1

https://twitter.com/alan_zimm/status/1429911651340406795

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants