-
-
Notifications
You must be signed in to change notification settings - Fork 389
handle trailing comma in import list properly #3035
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
Conversation
131b2b4
to
3fc1062
Compare
3fc1062
to
3393450
Compare
3535077
to
20e73a4
Compare
Strange. I can not reproduce this test failure locally. Both running tests and manually trying this feature give successful results.
|
Okay, that's because ghc-exactprint behaves differently in GHC 9.0 (not 9.2!) and GHC 8.10.7, where the API is the same. But in GHC 9.0, an extra comma is attached to the "list", besides the one attached to the "list item". According to the docs, that behavior might be wrong. Anyway, I finally got all compatibility issues handled. |
Works for me on GHC 9.2.3, thanks! (but I won't approve this because I haven't looked at the code) |
@georgefst Thanks for your testing! |
These cache directories are small, but not preserving them requires HLS to compile all modules in local project on workspace restarts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
let isAnnComma (G AnnComma, _) = True | ||
isAnnComma _ = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: can we align this or remove the superfuous space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, my mistake. btw, stylish-haskell refuses to run on this file, because there are too many CPP, making it fail.
fix #2958