-
-
Notifications
You must be signed in to change notification settings - Fork 397
Fix renaming data constructors with fields (resolves #2915, resolves #4083) #4635
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
base: master
Are you sure you want to change the base?
Conversation
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! Thanks for fixing it.
Wait, it will require some work. It doesn't work as is, yet 😸 |
My bad, I saw all the tests have been passed and thought it is ready. Forget to check if the new test have been supplied😆 |
Looks promising, but still not 100% done. There's an issue with Record wildcards - the current impl. somehow removes the
|
@@ -24,6 +24,11 @@ tests :: TestTree | |||
tests = testGroup "Rename" | |||
[ goldenWithRename "Data constructor" "DataConstructor" $ \doc -> | |||
rename doc (Position 0 15) "Op" | |||
, goldenWithRename "Data constructor with fields" "DataConstructorWithFields" $ \doc -> | |||
rename doc (Position 1 13) "FooRenamed" | |||
, knownBrokenForGhcVersions [GHC96, GHC98] "renaming Constructor{..} with RecordWildcard removes .." $ |
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.
Fyi this is a separate new issue I discovered while testing this PR that affects ghc 9.6 and 9.8.
I opened a separate issue to track that: #4636
Attempt at resolving #2915 and #4083