Renamer: improve handling of export children
This commit refactors the 'childGREPriority' function which is used when renaming subordinate items in export lists and class declarations. Instead of having a complicated LookupChild parameter, we now simply pass the GREInfo of the parent, which allows us to decide what is a valid child: - classes can have children that are in the type constructor namespace, - promoted data constructors should be treated the same as normal data constructors. Fixes #24027
Showing
- compiler/GHC/Rename/Env.hs 41 additions, 37 deletionscompiler/GHC/Rename/Env.hs
- compiler/GHC/Tc/Gen/Export.hs 10 additions, 17 deletionscompiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Types/Name/Reader.hs 96 additions, 94 deletionscompiler/GHC/Types/Name/Reader.hs
- testsuite/tests/rename/should_compile/T24027.hs 6 additions, 0 deletionstestsuite/tests/rename/should_compile/T24027.hs
- testsuite/tests/rename/should_compile/T24027_aux.hs 4 additions, 0 deletionstestsuite/tests/rename/should_compile/T24027_aux.hs
- testsuite/tests/rename/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/rename/should_compile/all.T
Loading
Please register or sign in to comment