Do not discard insoluble Derived constraints
This is preparing for a fix to Trac #9612. The idea is that insoluble constraints are nice solid errors that we should not discard before we have a chance to report them. So TcRnTypes.dropDerivedWC now keeps insoluble Derived constrains, and instead TcSimplify.solve_wanteds filters them out We get somewhat better error message for kind-equality failures too. A slight downside is that to avoid *duplicate* kind-equality failures when we float a kind-incompatible equality (e.g. alpha:* ~ Int#), I've disabled constraint-floating when there are insolubles. But that in turn makes a handful of error messages a little less informative; good examples are mc21, mc22, mc25. But I am re-jigging the constraint floating machinery in another branch, which will make this go back to the way it was before.
Showing
- compiler/typecheck/TcRnTypes.lhs 21 additions, 23 deletionscompiler/typecheck/TcRnTypes.lhs
- compiler/typecheck/TcSimplify.lhs 16 additions, 2 deletionscompiler/typecheck/TcSimplify.lhs
- testsuite/tests/indexed-types/should_fail/T3330c.stderr 4 additions, 18 deletionstestsuite/tests/indexed-types/should_fail/T3330c.stderr
- testsuite/tests/typecheck/should_fail/T3950.stderr 4 additions, 1 deletiontestsuite/tests/typecheck/should_fail/T3950.stderr
- testsuite/tests/typecheck/should_fail/T5570.stderr 9 additions, 8 deletionstestsuite/tests/typecheck/should_fail/T5570.stderr
- testsuite/tests/typecheck/should_fail/T7368.stderr 2 additions, 1 deletiontestsuite/tests/typecheck/should_fail/T7368.stderr
- testsuite/tests/typecheck/should_fail/T7368a.stderr 12 additions, 11 deletionstestsuite/tests/typecheck/should_fail/T7368a.stderr
- testsuite/tests/typecheck/should_fail/T8262.stderr 2 additions, 1 deletiontestsuite/tests/typecheck/should_fail/T8262.stderr
- testsuite/tests/typecheck/should_fail/T8603.stderr 25 additions, 22 deletionstestsuite/tests/typecheck/should_fail/T8603.stderr
- testsuite/tests/typecheck/should_fail/mc21.stderr 2 additions, 2 deletionstestsuite/tests/typecheck/should_fail/mc21.stderr
- testsuite/tests/typecheck/should_fail/mc22.stderr 9 additions, 8 deletionstestsuite/tests/typecheck/should_fail/mc22.stderr
- testsuite/tests/typecheck/should_fail/mc25.stderr 7 additions, 7 deletionstestsuite/tests/typecheck/should_fail/mc25.stderr
- testsuite/tests/typecheck/should_fail/tcfail090.stderr 8 additions, 7 deletionstestsuite/tests/typecheck/should_fail/tcfail090.stderr
- testsuite/tests/typecheck/should_fail/tcfail122.stderr 2 additions, 1 deletiontestsuite/tests/typecheck/should_fail/tcfail122.stderr
- testsuite/tests/typecheck/should_fail/tcfail123.stderr 9 additions, 8 deletionstestsuite/tests/typecheck/should_fail/tcfail123.stderr
- testsuite/tests/typecheck/should_fail/tcfail159.stderr 9 additions, 8 deletionstestsuite/tests/typecheck/should_fail/tcfail159.stderr
- testsuite/tests/typecheck/should_fail/tcfail200.stderr 2 additions, 1 deletiontestsuite/tests/typecheck/should_fail/tcfail200.stderr
Loading
Please register or sign in to comment