summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_fail/T2544.stderr
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-05-07 09:07:51 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2015-06-11 13:32:27 +0100
commitddbb97d00fdbc5870a4076ed15af8e607b161cb2 (patch)
treeefc9b18c9786fa059e0ff8999a790e24f82ecb60 /testsuite/tests/indexed-types/should_fail/T2544.stderr
parentca39b96ee783e124909a89ea3ad366bf99defa7b (diff)
downloadhaskell-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/indexed-types/should_fail/T2544.stderr')
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2544.stderr33
1 files changed, 22 insertions, 11 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T2544.stderr b/testsuite/tests/indexed-types/should_fail/T2544.stderr
index 7a1f564c56..0245cb7b6a 100644
--- a/testsuite/tests/indexed-types/should_fail/T2544.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2544.stderr
@@ -1,11 +1,22 @@
-
-T2544.hs:17:12:
- Couldn't match type ‘IxMap l’ with ‘IxMap i0’
- NB: ‘IxMap’ is a type function, and may not be injective
- The type variable ‘i0’ is ambiguous
- Expected type: IxMap (l :|: r) [Int]
- Actual type: BiApp (IxMap i0) (IxMap i1) [Int]
- Relevant bindings include
- empty :: IxMap (l :|: r) [Int] (bound at T2544.hs:17:4)
- In the expression: BiApp empty empty
- In an equation for ‘empty’: empty = BiApp empty empty
+
+T2544.hs:17:18: error:
+ Couldn't match type ‘IxMap i0’ with ‘IxMap l’
+ NB: ‘IxMap’ is a type function, and may not be injective
+ The type variable ‘i0’ is ambiguous
+ Expected type: IxMap l [Int]
+ Actual type: IxMap i0 [Int]
+ Relevant bindings include
+ empty :: IxMap (l :|: r) [Int] (bound at T2544.hs:17:4)
+ In the first argument of ‘BiApp’, namely ‘empty’
+ In the expression: BiApp empty empty
+
+T2544.hs:17:24: error:
+ Couldn't match type ‘IxMap i1’ with ‘IxMap r’
+ NB: ‘IxMap’ is a type function, and may not be injective
+ The type variable ‘i1’ is ambiguous
+ Expected type: IxMap r [Int]
+ Actual type: IxMap i1 [Int]
+ Relevant bindings include
+ empty :: IxMap (l :|: r) [Int] (bound at T2544.hs:17:4)
+ In the second argument of ‘BiApp’, namely ‘empty’
+ In the expression: BiApp empty empty