error messages: Don't display ghci specific hints for missing packages
Tickets like #22884 suggest that it is confusing that GHC used on the command line can suggest options which only work in GHCi. This ticket uses the error message infrastructure to override certain error messages which displayed GHCi specific information so that this information is only showed when using GHCi. The main annoyance is that we mostly want to display errors in the same way as before, but with some additional information. This means that the error rendering code has to be exported from the Iface/Errors/Ppr.hs module. I am unsure about whether the approach taken here is the best or most maintainable solution. Fixes #22884
Showing
- compiler/GHC/Iface/Errors/Ppr.hs 41 additions, 36 deletionscompiler/GHC/Iface/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Ppr.hs 14 additions, 6 deletionscompiler/GHC/Tc/Errors/Ppr.hs
- ghc/GHCi/UI/Exception.hs 74 additions, 8 deletionsghc/GHCi/UI/Exception.hs
- testsuite/tests/driver/multipleHomeUnits/multipleHomeUnitsModuleVisibility.stderr 1 addition, 1 deletion...ultipleHomeUnits/multipleHomeUnitsModuleVisibility.stderr
- testsuite/tests/ghc-api/target-contents/TargetContents.stderr 2 additions, 2 deletions...suite/tests/ghc-api/target-contents/TargetContents.stderr
- testsuite/tests/ghc-e/should_run/T2636.stderr 1 addition, 1 deletiontestsuite/tests/ghc-e/should_run/T2636.stderr
- testsuite/tests/module/mod1.stderr 1 addition, 1 deletiontestsuite/tests/module/mod1.stderr
- testsuite/tests/module/mod2.stderr 1 addition, 1 deletiontestsuite/tests/module/mod2.stderr
- testsuite/tests/package/T22884.hs 3 additions, 0 deletionstestsuite/tests/package/T22884.hs
- testsuite/tests/package/T22884.stderr 5 additions, 0 deletionstestsuite/tests/package/T22884.stderr
- testsuite/tests/package/T22884_interactive.script 3 additions, 0 deletionstestsuite/tests/package/T22884_interactive.script
- testsuite/tests/package/T22884_interactive.stderr 6 additions, 0 deletionstestsuite/tests/package/T22884_interactive.stderr
- testsuite/tests/package/T4806.stderr 1 addition, 1 deletiontestsuite/tests/package/T4806.stderr
- testsuite/tests/package/T4806_interactive.script 3 additions, 0 deletionstestsuite/tests/package/T4806_interactive.script
- testsuite/tests/package/T4806_interactive.stderr 6 additions, 0 deletionstestsuite/tests/package/T4806_interactive.stderr
- testsuite/tests/package/T4806a.stderr 1 addition, 1 deletiontestsuite/tests/package/T4806a.stderr
- testsuite/tests/package/all.T 3 additions, 0 deletionstestsuite/tests/package/all.T
- testsuite/tests/package/package01e.stderr 2 additions, 6 deletionstestsuite/tests/package/package01e.stderr
- testsuite/tests/package/package06e.stderr 2 additions, 6 deletionstestsuite/tests/package/package06e.stderr
- testsuite/tests/package/package07e.stderr 4 additions, 10 deletionstestsuite/tests/package/package07e.stderr
Loading
Please register or sign in to comment