Add a hint to enable ExplicitNamespaces for type operator imports (Fixes/Enhances #20007)
As suggested in #20007 and implemented in !8895, trying to import type operators will suggest a fix to use the 'type' keyword, without considering whether ExplicitNamespaces is enabled. This patch will query whether ExplicitNamespaces is enabled and add a hint to suggest enabling ExplicitNamespaces if it isn't enabled, alongside the suggestion of adding the 'type' keyword.
Showing
- compiler/GHC/Rename/Names.hs 4 additions, 3 deletionscompiler/GHC/Rename/Names.hs
- compiler/GHC/Tc/Errors/Ppr.hs 3 additions, 1 deletioncompiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs 3 additions, 1 deletioncompiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Types/Hint/Ppr.hs 3 additions, 3 deletionscompiler/GHC/Types/Hint/Ppr.hs
- testsuite/tests/module/T20007.hs 1 addition, 0 deletionstestsuite/tests/module/T20007.hs
- testsuite/tests/module/T20007.stderr 8 additions, 0 deletionstestsuite/tests/module/T20007.stderr
- testsuite/tests/module/all.T 1 addition, 0 deletionstestsuite/tests/module/all.T
Loading
Please register or sign in to comment