-
-
Notifications
You must be signed in to change notification settings - Fork 392
9.4 support for rename plugin #3417
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
107a876
to
1950276
Compare
Seems like this PR is making some substantive changes, worth comments? |
let oldNames = (filter matchesDirect indirectOldNames) ++ directOldNames | ||
matchesDirect n = occNameFS (nameOccName n) `elem` directFS | ||
where | ||
directFS = map (occNameFS. nameOccName) directOldNames |
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.
Why is this necessary? Is there a case that we were missing?
The only case I am aware of for indirect names is with record field puns, but these should always "match" the direct names since they are, well, puns.
Looks good otherwise - many thanks
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.
If there are implicit dictionary names (eg $fShow
for code like show 1
) then we don't want to attempt to rename those.
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.
You should mention that you need to filter stuff out since GHC-9.4 because now there are implicit dictionary names like $fShow
which we don't want to attempt to rename.
75320f1
to
c5806b0
Compare
c5806b0
to
a542c2d
Compare
I've added some comments. |
I discussed this with Zubin and asked him to write a comment explaining what was going on with the |
No description provided.