diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-09-26 10:44:46 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-09-26 10:56:47 +0100 |
commit | 20632d37b5bcb68bb0ca34238f1ed49c7be3a8f7 (patch) | |
tree | bd989d8a78331093ef62294939104c22fcc84fe3 /testsuite/tests/typecheck/should_fail/mc25.stderr | |
parent | 74ae59896e4222a8115f5548845f13495f5bb76e (diff) | |
download | haskell-20632d37b5bcb68bb0ca34238f1ed49c7be3a8f7.tar.gz |
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.
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/mc25.stderr')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/mc25.stderr | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/testsuite/tests/typecheck/should_fail/mc25.stderr b/testsuite/tests/typecheck/should_fail/mc25.stderr index 6af388febe..e101f4b328 100644 --- a/testsuite/tests/typecheck/should_fail/mc25.stderr +++ b/testsuite/tests/typecheck/should_fail/mc25.stderr @@ -1,18 +1,18 @@ mc25.hs:9:24: - No instance for (Functor t1) arising from a use of ‘fmap’ + No instance for (Functor t2) arising from a use of ‘fmap’ Possible fix: - add (Functor t1) to the context of - a type expected by the context: (a -> b) -> t1 a -> t1 b - or the inferred type of z :: [t1 t] + add (Functor t2) to the context of + a type expected by the context: (a -> b) -> t2 a -> t2 b + or the inferred type of z :: t (t2 t1) In the expression: fmap In a stmt of a monad comprehension: then group by x using take In the expression: [x | x <- [1 .. 10], then group by x using take] mc25.hs:9:46: - Couldn't match type ‘Int’ with ‘a -> t’ - Expected type: (a -> t) -> [a] -> [t1 a] + Couldn't match type ‘Int’ with ‘a -> t1’ + Expected type: (a -> t1) -> [a] -> t (t2 a) Actual type: Int -> [a] -> [a] - Relevant bindings include z :: [t1 t] (bound at mc25.hs:9:1) + Relevant bindings include z :: t (t2 t1) (bound at mc25.hs:9:1) In the expression: take In a stmt of a monad comprehension: then group by x using take |