Add -Wrule-lhs-equalities warning
This commit adds a new warning, controlled by the warning flag, -Wrule-lhs-equalities, which is emitted when the LHS of a RULE gives rise to equality constraints that previous GHC versions would have quantified over. GHC instead discards such RULES, as GHC was never able to generate a rule template that would ever fire; it's better to be explicit about the fact that the RULE doesn't work.
Showing
- compiler/GHC/Core/Rules.hs 11 additions, 10 deletionscompiler/GHC/Core/Rules.hs
- compiler/GHC/Driver/Flags.hs 7 additions, 1 deletioncompiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs 1 addition, 0 deletionscompiler/GHC/Driver/Session.hs
- compiler/GHC/Tc/Errors/Ppr.hs 14 additions, 0 deletionscompiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs 15 additions, 3 deletionscompiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Sig.hs 122 additions, 11 deletionscompiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Types/Error/Codes.hs 1 addition, 0 deletionscompiler/GHC/Types/Error/Codes.hs
- docs/users_guide/9.14.1-notes.rst 9 additions, 1 deletiondocs/users_guide/9.14.1-notes.rst
- docs/users_guide/using-warnings.rst 18 additions, 0 deletionsdocs/users_guide/using-warnings.rst
- testsuite/tests/typecheck/should_compile/RuleEqs.hs 24 additions, 0 deletionstestsuite/tests/typecheck/should_compile/RuleEqs.hs
- testsuite/tests/typecheck/should_compile/RuleEqs.stderr 7 additions, 0 deletionstestsuite/tests/typecheck/should_compile/RuleEqs.stderr
- testsuite/tests/typecheck/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/typecheck/should_compile/all.T
Loading
Please register or sign in to comment