diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-04-25 00:04:45 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-04-28 10:59:51 +0100 |
commit | ba2e20149e2addaccf5ce3122d3a6e93da696a0a (patch) | |
tree | 14d2eb5a30ccb5f98be00caae683393e98d19979 /testsuite/tests/typecheck/should_fail/T8603.stderr | |
parent | 0960a37868e6d08857e86465c8ca346b29b1c813 (diff) | |
download | haskell-ba2e20149e2addaccf5ce3122d3a6e93da696a0a.tar.gz |
Do type-class defaulting even if there are insoluble constraints
The argument in Trac #9033 is very compelling: we should not report 20
errors, fix one, and have the other 19 disappear. They were spurious
in the first place.
The fix was easy; do type-class defaulting uncondionally, rather than
only if there are no insoluble constraints.
See Note [When to do type-class defaulting] in TcSimplify.
Error messages generally improve, especially tc211 which actually
had an example of precisely this phenomenon.
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T8603.stderr')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T8603.stderr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T8603.stderr b/testsuite/tests/typecheck/should_fail/T8603.stderr index cf12725281..8ee8cccb4a 100644 --- a/testsuite/tests/typecheck/should_fail/T8603.stderr +++ b/testsuite/tests/typecheck/should_fail/T8603.stderr @@ -1,11 +1,11 @@ T8603.hs:29:17:
- Couldn't match type ‘(->) [a0]’ with ‘[t1]’
- Expected type: [t1] -> StateT s RV t0
- Actual type: t2 ((->) [a0]) (StateT s RV t0)
+ Couldn't match type ‘(->) [a0]’ with ‘[Integer]’
+ Expected type: [Integer] -> StateT s RV t0
+ Actual type: t1 ((->) [a0]) (StateT s RV t0)
The function ‘lift’ is applied to two arguments,
but its type ‘([a0] -> StateT s RV t0)
- -> t2 ((->) [a0]) (StateT s RV t0)’
+ -> t1 ((->) [a0]) (StateT s RV t0)’
has only one
In a stmt of a 'do' block: prize <- lift uniform [1, 2, 3]
In the expression:
|