diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-05-07 09:07:51 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-06-11 13:32:27 +0100 |
commit | ddbb97d00fdbc5870a4076ed15af8e607b161cb2 (patch) | |
tree | efc9b18c9786fa059e0ff8999a790e24f82ecb60 /testsuite/tests/typecheck/should_fail/tcfail143.stderr | |
parent | ca39b96ee783e124909a89ea3ad366bf99defa7b (diff) | |
download | haskell-ddbb97d00fdbc5870a4076ed15af8e607b161cb2.tar.gz |
Another major improvement of "improvement"
I wasn't very happy with my fix to Trac #10009. This is much better.
The main idea is that the inert set now contains a "model", which
embodies *all* the (nominal) equalities that we know about, with
a view to exposing unifications. This requires a lot fewer iterations
of the solver than before.
There are extensive comments in
TcSMonad: Note [inert_model: the inert model]
Note [Adding an inert canonical constraint the InertCans]
The big changes are
* New inert_model field in InertCans
* Functions addInertEq, addInertCan deal with adding a
constraint, maintaining the model
* A nice improvement is that unification variables can
unify with fmvs, so that from, say alpha ~ fmv
we get alpha := fmv
See Note [Orientation of equalities with fmvs] in TcFlatten
It's still not perfect, as the Note explains
New flag -fconstraint-solver-iterations=n, allows us to control
the number of constraint solver iterations, and in particular
will flag up when it's more than a small number.
Performance is generally slightly better:
T5837 is a lot better for some reason.
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail143.stderr')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail143.stderr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail143.stderr b/testsuite/tests/typecheck/should_fail/tcfail143.stderr index 7c26762a66..14c73d98da 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail143.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail143.stderr @@ -1,8 +1,8 @@ tcfail143.hs:29:9: error: - Couldn't match type ‘Z’ with ‘S Z’ + Couldn't match type ‘S Z’ with ‘Z’ arising from a functional dependency between: constraint ‘MinMax (S Z) Z Z Z’ arising from a use of ‘extend’ - instance ‘MinMax Z b Z b’ at tcfail143.hs:12:10-23 + instance ‘MinMax a Z Z a’ at tcfail143.hs:11:10-23 In the expression: n1 `extend` n0 In an equation for ‘t2’: t2 = n1 `extend` n0 |