-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
GADT syntax converter throws out all datatype comments #3516
Comments
It's a known limitation because dealing with comment much harder for me. Any improvements are welcomed! |
@July541 Could you point to any relevant parts of code or issues? Like are there any parts of HLS which do handle comments? |
Sure. @uhbif19 #2899 (comment) and #2899 (comment) and #2899 (comment) are some discussion described the pain while dealing with comment. For code details, https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-gadt-plugin/src/Ide/Plugin/GHC.hs#L88 used to convert data declarations to GADT syntax, all comments are dropped here. While stepping in these codes, you may find the differences between different versions of
|
Thanks for references! I also have comment duplicating bug with "Add import" refactoring, so that is probably related to ghcides "simple handwritten parser" too. |
Do we have a related issue? |
@July541 I could not find anything matching it. I can create new. |
Your environment
haskell-language-server version: 1.8.0.0 (GHC: 8.10.7)
VS Code
Steps to reproduce
Run rewrite to GADT action on:
Expected behaviour
Got:
Actual behaviour
Got:
The text was updated successfully, but these errors were encountered: