Skip to content

feat: action to rename a module#379

Merged
mergify[bot] merged 2 commits intomainfrom
brprice/module-rename
Apr 25, 2022
Merged

feat: action to rename a module#379
mergify[bot] merged 2 commits intomainfrom
brprice/module-rename

Conversation

@brprice
Copy link
Copy Markdown
Contributor

@brprice brprice commented Apr 13, 2022

No description provided.

Comment thread primer/src/Primer/Core.hs
@brprice brprice force-pushed the brprice/module-rename branch from 11179f7 to c946e3d Compare April 13, 2022 12:54
@brprice brprice requested a review from a team April 13, 2022 14:03
@brprice brprice marked this pull request as ready for review April 13, 2022 14:03
@brprice brprice force-pushed the brprice/module-names branch 2 times, most recently from 8aa5dcf to 69b7753 Compare April 19, 2022 19:07
@brprice brprice force-pushed the brprice/module-rename branch 2 times, most recently from dd0a135 to 6938d0d Compare April 19, 2022 19:25
@brprice brprice force-pushed the brprice/module-names branch from 39cf2ca to 496a7ea Compare April 19, 2022 19:48
@brprice brprice force-pushed the brprice/module-rename branch from 76ea118 to 7996963 Compare April 19, 2022 19:50
@brprice brprice force-pushed the brprice/module-names branch 4 times, most recently from 83602e5 to ec61235 Compare April 25, 2022 12:41
brprice added 2 commits April 25, 2022 17:14
This makes renaming modules a lot slicker, as we can do more
generically.
The reason for the slightly convoluted implementation is that I am
looking forward to when we have multiple editable modules, where we need
to edit multiple modules (as they all may contain references to the
renamed module). A potential optimisation is only checking for name
clashes with imports and not rewriting theose modules, since we do not
support renaming imports, and imports cannot depend on the editable
module.

I also take the chance to simplify the test code which does module
renaming, now that the idea has been properly implemented in the
library, with name clash detection. It is not worth making the library
more complex or exposing an "unsafe" version for one use in testsuite
(which intentionally clashes names, in order to merge modules).
@brprice brprice force-pushed the brprice/module-rename branch from e8cdbfc to 6d15e60 Compare April 25, 2022 16:18
@brprice brprice added the Ready to merge Ready to merge label Apr 25, 2022
Base automatically changed from brprice/module-names to main April 25, 2022 16:53
@mergify mergify Bot merged commit 817bc9b into main Apr 25, 2022
@mergify mergify Bot deleted the brprice/module-rename branch April 25, 2022 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge Ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants