Introduce warning for loopy superclass solve
Commit aed1974e completely re-engineered the treatment of loopy superclass dictionaries in instance declarations. Unfortunately, it has the potential to break (albeit in a rather minor way) user code. To alleviate migration concerns, this commit re-introduces the old behaviour. Any reliance on this old behaviour triggers a warning, controlled by `-Wloopy-superclass-solve`. The warning text explains that GHC might produce bottoming evidence, and provides a migration strategy. This allows us to provide a graceful migration period, alerting users when they are relying on this unsound behaviour. Fixes #22912 #22891 #20666 #22894 #22905
Showing
- compiler/GHC/Driver/Flags.hs 3 additions, 0 deletionscompiler/GHC/Driver/Flags.hs
- compiler/GHC/Tc/Errors/Ppr.hs 22 additions, 1 deletioncompiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs 17 additions, 0 deletionscompiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Solver/InertSet.hs 11 additions, 4 deletionscompiler/GHC/Tc/Solver/InertSet.hs
- compiler/GHC/Tc/Solver/Interact.hs 65 additions, 38 deletionscompiler/GHC/Tc/Solver/Interact.hs
- compiler/GHC/Tc/Solver/Monad.hs 17 additions, 11 deletionscompiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/TyCl/Instance.hs 14 additions, 0 deletionscompiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/Types/Origin.hs-boot 4 additions, 0 deletionscompiler/GHC/Tc/Types/Origin.hs-boot
- compiler/GHC/Types/Error/Codes.hs 1 addition, 0 deletionscompiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Hint.hs 4 additions, 0 deletionscompiler/GHC/Types/Hint.hs
- compiler/GHC/Types/Hint/Ppr.hs 9 additions, 0 deletionscompiler/GHC/Types/Hint/Ppr.hs
- docs/users_guide/9.6.1-notes.rst 27 additions, 1 deletiondocs/users_guide/9.6.1-notes.rst
- docs/users_guide/using-warnings.rst 16 additions, 0 deletionsdocs/users_guide/using-warnings.rst
- testsuite/tests/quantified-constraints/all.T 1 addition, 0 deletionstestsuite/tests/quantified-constraints/all.T
- testsuite/tests/typecheck/should_compile/T20666b.hs 12 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T20666b.hs
- testsuite/tests/typecheck/should_compile/T20666b.stderr 10 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T20666b.stderr
- testsuite/tests/typecheck/should_compile/T22891.hs 9 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T22891.hs
- testsuite/tests/typecheck/should_compile/T22891.stderr 10 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T22891.stderr
- testsuite/tests/typecheck/should_compile/T22912.hs 26 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T22912.hs
- testsuite/tests/typecheck/should_compile/T22912.stderr 12 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T22912.stderr
Loading
Please register or sign in to comment