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/indexed-types/should_fail/T5934.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/indexed-types/should_fail/T5934.stderr')
-rw-r--r-- | testsuite/tests/indexed-types/should_fail/T5934.stderr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T5934.stderr b/testsuite/tests/indexed-types/should_fail/T5934.stderr index 85ab1a1804..67a468057c 100644 --- a/testsuite/tests/indexed-types/should_fail/T5934.stderr +++ b/testsuite/tests/indexed-types/should_fail/T5934.stderr @@ -1,8 +1,8 @@ T5934.hs:12:7:
- Cannot instantiate unification variable ‘a0’
- with a type involving foralls:
- (forall s. Gen (PrimState (ST s))) -> Int
- Perhaps you want ImpredicativeTypes
+ Couldn't match type ‘Integer’
+ with ‘(forall s. Gen (PrimState (ST s))) -> Int’
+ Expected type: Integer -> (forall s. GenST s) -> Int
+ Actual type: Integer -> Integer
In the expression: 0
In an equation for ‘run’: run = 0
|