summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-09-21 12:19:56 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2012-09-21 12:19:56 +0100
commitf1557f3b7cfb0b036d0ab350ffaa910f95ff58cc (patch)
treed92417d310e276977214ab989615b17c71ddb5d4 /testsuite/tests/typecheck
parent7095121c528fa81a27405009801855ec62fd8a7c (diff)
downloadhaskell-f1557f3b7cfb0b036d0ab350ffaa910f95ff58cc.tar.gz
A ton of error message wibbles
Notably * Showing relevant bindings * Not suggesting add instance (Num T); see Trac #7222
Diffstat (limited to 'testsuite/tests/typecheck')
-rw-r--r--testsuite/tests/typecheck/should_compile/FD1.stderr25
-rw-r--r--testsuite/tests/typecheck/should_compile/FD2.stderr6
-rw-r--r--testsuite/tests/typecheck/should_compile/T2494.stderr24
-rw-r--r--testsuite/tests/typecheck/should_compile/tc141.stderr9
-rw-r--r--testsuite/tests/typecheck/should_compile/tc168.stderr1
-rw-r--r--testsuite/tests/typecheck/should_compile/tc211.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/IPFail.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/LongWayOverlapping.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/SCLoop.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T1899.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/T2414.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T2534.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T2688.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T2714.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T2846b.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/T3592.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/T5300.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/T5570.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/T5684.stderr88
-rw-r--r--testsuite/tests/typecheck/should_fail/T5689.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/T5853.stderr19
-rw-r--r--testsuite/tests/typecheck/should_fail/T5858.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/mc20.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/mc22.stderr21
-rw-r--r--testsuite/tests/typecheck/should_fail/mc23.stderr19
-rw-r--r--testsuite/tests/typecheck/should_fail/mc24.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/mc25.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail001.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail002.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail003.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail004.stderr7
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail005.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail006.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail007.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail008.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail010.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail013.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail014.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail015.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail016.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail017.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail018.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail019.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail020.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail029.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail032.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail033.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail043.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail046.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail065.stderr25
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail068.stderr224
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail076.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail083.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail099.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail102.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail103.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail106.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail109.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail128.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail131.stderr25
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail133.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail137.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail140.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail153.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail169.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail174.stderr66
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail175.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail178.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail179.stderr31
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail182.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail189.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail190.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail192.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail194.stderr19
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail198.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail201.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail206.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail208.stderr1
79 files changed, 606 insertions, 401 deletions
diff --git a/testsuite/tests/typecheck/should_compile/FD1.stderr b/testsuite/tests/typecheck/should_compile/FD1.stderr
index ea6833b2b7..fdeb30e42d 100644
--- a/testsuite/tests/typecheck/should_compile/FD1.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD1.stderr
@@ -1,12 +1,13 @@
-
-FD1.hs:16:1:
- Could not deduce (a ~ (Int -> Int))
- from the context (E a (Int -> Int))
- bound by the type signature for
- plus :: E a (Int -> Int) => Int -> a
- at FD1.hs:15:9-38
- `a' is a rigid type variable bound by
- the type signature for plus :: E a (Int -> Int) => Int -> a
- at FD1.hs:15:9
- The equation(s) for `plus' have two arguments,
- but its type `Int -> a' has only one
+
+FD1.hs:16:1:
+ Could not deduce (a ~ (Int -> Int))
+ from the context (E a (Int -> Int))
+ bound by the type signature for
+ plus :: E a (Int -> Int) => Int -> a
+ at FD1.hs:15:9-38
+ `a' is a rigid type variable bound by
+ the type signature for plus :: E a (Int -> Int) => Int -> a
+ at FD1.hs:15:9
+ Relevant bindings include plus :: Int -> a (bound at FD1.hs:16:1)
+ The equation(s) for `plus' have two arguments,
+ but its type `Int -> a' has only one
diff --git a/testsuite/tests/typecheck/should_compile/FD2.stderr b/testsuite/tests/typecheck/should_compile/FD2.stderr
index 47221c5b00..d23dd33e65 100644
--- a/testsuite/tests/typecheck/should_compile/FD2.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD2.stderr
@@ -20,6 +20,12 @@ FD2.hs:26:34:
the type signature for
foldr1 :: Elem a e => (e -> e -> e) -> a -> e
at FD2.hs:21:13
+ Relevant bindings include
+ foldr1 :: (e -> e -> e) -> a -> e (bound at FD2.hs:22:3)
+ f :: e -> e -> e (bound at FD2.hs:22:10)
+ mf :: e1 -> Maybe e1 -> Maybe e1 (bound at FD2.hs:25:12)
+ x :: e1 (bound at FD2.hs:26:15)
+ y :: e1 (bound at FD2.hs:26:23)
In the return type of a call of `f'
In the first argument of `Just', namely `(f x y)'
In the expression: Just (f x y)
diff --git a/testsuite/tests/typecheck/should_compile/T2494.stderr b/testsuite/tests/typecheck/should_compile/T2494.stderr
index 2e943ac0a5..bbb8d0c946 100644
--- a/testsuite/tests/typecheck/should_compile/T2494.stderr
+++ b/testsuite/tests/typecheck/should_compile/T2494.stderr
@@ -1,24 +1,36 @@
T2494.hs:15:14:
- Couldn't match type `b' with `a'
- `b' is a rigid type variable bound by
- the RULE "foo/foo" at T2494.hs:14:16
+ Couldn't match type `a' with `b'
`a' is a rigid type variable bound by
the RULE "foo/foo" at T2494.hs:13:16
+ `b' is a rigid type variable bound by
+ the RULE "foo/foo" at T2494.hs:14:16
Expected type: Maybe (m a) -> Maybe (m a)
Actual type: Maybe (m b) -> Maybe (m b)
+ Relevant bindings include
+ x :: Maybe a (bound at T2494.hs:14:65)
+ g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b)
+ (bound at T2494.hs:14:11)
+ f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a)
+ (bound at T2494.hs:13:11)
In the first argument of `foo', namely `g'
In the second argument of `foo', namely `(foo g x)'
In the expression: foo f (foo g x)
T2494.hs:15:30:
- Couldn't match type `b' with `a'
- `b' is a rigid type variable bound by
- the RULE "foo/foo" at T2494.hs:14:16
+ Couldn't match type `a' with `b'
`a' is a rigid type variable bound by
the RULE "foo/foo" at T2494.hs:13:16
+ `b' is a rigid type variable bound by
+ the RULE "foo/foo" at T2494.hs:14:16
Expected type: Maybe (m a) -> Maybe (m a)
Actual type: Maybe (m b) -> Maybe (m b)
+ Relevant bindings include
+ x :: Maybe a (bound at T2494.hs:14:65)
+ g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b)
+ (bound at T2494.hs:14:11)
+ f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a)
+ (bound at T2494.hs:13:11)
In the second argument of `(.)', namely `g'
In the first argument of `foo', namely `(f . g)'
In the expression: foo (f . g) x
diff --git a/testsuite/tests/typecheck/should_compile/tc141.stderr b/testsuite/tests/typecheck/should_compile/tc141.stderr
index a22689b10f..1942963d3b 100644
--- a/testsuite/tests/typecheck/should_compile/tc141.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc141.stderr
@@ -12,6 +12,11 @@ tc141.hs:11:31:
an expression type signature: a1 at tc141.hs:11:31
`a' is a rigid type variable bound by
the inferred type of f :: (a, a) -> (t, a) at tc141.hs:11:1
+ Relevant bindings include
+ f :: (a, a) -> (t, a) (bound at tc141.hs:11:1)
+ x :: (a, a) (bound at tc141.hs:11:3)
+ q :: a (bound at tc141.hs:11:17)
+ p :: a (bound at tc141.hs:11:12)
In the expression: q :: a
In the expression: (q :: a, p)
In the expression: let (p :: a, q :: a) = x in (q :: a, p)
@@ -34,6 +39,10 @@ tc141.hs:15:18:
the type signature for v :: a2 at tc141.hs:14:19
`t' is a rigid type variable bound by
the inferred type of g :: a -> t -> a1 at tc141.hs:13:1
+ Relevant bindings include
+ g :: a -> t -> a1 (bound at tc141.hs:13:1)
+ b :: t (bound at tc141.hs:13:5)
+ v :: a2 (bound at tc141.hs:15:14)
In the expression: b
In an equation for `v': v = b
In the expression:
diff --git a/testsuite/tests/typecheck/should_compile/tc168.stderr b/testsuite/tests/typecheck/should_compile/tc168.stderr
index cbaa0aceeb..8c0c81330f 100644
--- a/testsuite/tests/typecheck/should_compile/tc168.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc168.stderr
@@ -7,7 +7,6 @@ tc168.hs:17:1:
at tc168.hs:17:1-16
The type variable `b0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
- Possible fix: add an instance declaration for (C a1 (a, b0))
When checking that `g'
has the inferred type `forall a b a1. C a1 (a, b) => a1 -> a'
Probable cause: the inferred type is ambiguous
diff --git a/testsuite/tests/typecheck/should_compile/tc211.stderr b/testsuite/tests/typecheck/should_compile/tc211.stderr
index e6c5675422..3fc5e256a6 100644
--- a/testsuite/tests/typecheck/should_compile/tc211.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc211.stderr
@@ -14,9 +14,9 @@ tc211.hs:15:22:
(head foo) foo
tc211.hs:70:9:
- Couldn't match type `forall a1. a1 -> a1' with `a -> a'
+ Couldn't match type `forall a2. a2 -> a2' with `a1 -> a1'
Expected type: List (forall a. a -> a)
- -> (forall a. a -> a) -> a -> a
+ -> (forall a. a -> a) -> a1 -> a1
Actual type: List (forall a. a -> a)
-> (forall a. a -> a) -> forall a. a -> a
In the expression:
diff --git a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
index 8a942de483..60a334232e 100644
--- a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
+++ b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
@@ -1,12 +1,14 @@
FDsFromGivens.hs:21:15:
- Couldn't match type `Char' with `[a0]'
+ Couldn't match type `Char' with `[a]'
+ Relevant bindings include
+ bar :: KCC -> a -> a (bound at FDsFromGivens.hs:21:1)
When using functional dependencies to combine
C Char Char,
arising from a pattern with constructor
KCC :: C Char Char => () -> KCC,
in an equation for `bar'
at FDsFromGivens.hs:21:6-10
- C Char [a0], arising from a use of `f' at FDsFromGivens.hs:21:15
+ C Char [a], arising from a use of `f' at FDsFromGivens.hs:21:15
In the expression: f
In an equation for `bar': bar (KCC _) = f
diff --git a/testsuite/tests/typecheck/should_fail/IPFail.stderr b/testsuite/tests/typecheck/should_fail/IPFail.stderr
index efad8b3d56..d8efdfec56 100644
--- a/testsuite/tests/typecheck/should_fail/IPFail.stderr
+++ b/testsuite/tests/typecheck/should_fail/IPFail.stderr
@@ -4,7 +4,6 @@ IPFail.hs:6:18:
from the context (?x::Int)
bound by the type signature for f0 :: (?x::Int) => () -> Bool
at IPFail.hs:5:7-31
- Possible fix: add an instance declaration for (Num Bool)
In the expression: 5
In the expression: let ?x = 5 in ?x
In an equation for `f0': f0 () = let ?x = 5 in ?x
diff --git a/testsuite/tests/typecheck/should_fail/LongWayOverlapping.stderr b/testsuite/tests/typecheck/should_fail/LongWayOverlapping.stderr
index 7cc45560c9..fbd0b44868 100644
--- a/testsuite/tests/typecheck/should_fail/LongWayOverlapping.stderr
+++ b/testsuite/tests/typecheck/should_fail/LongWayOverlapping.stderr
@@ -1,9 +1,7 @@
-
-LongWayOverlapping.hs:23:11:
- No instance for (EmbAsChild [Char] Char)
- arising from a use of `emb'
- Possible fix:
- add an instance declaration for (EmbAsChild [Char] Char)
- In the expression: emb 'c'
- In an equation for `emb': emb _ = emb 'c'
- In the instance declaration for `EmbAsChild [Char] Bool'
+
+LongWayOverlapping.hs:23:11:
+ No instance for (EmbAsChild [Char] Char)
+ arising from a use of `emb'
+ In the expression: emb 'c'
+ In an equation for `emb': emb _ = emb 'c'
+ In the instance declaration for `EmbAsChild [Char] Bool'
diff --git a/testsuite/tests/typecheck/should_fail/SCLoop.stderr b/testsuite/tests/typecheck/should_fail/SCLoop.stderr
index 277b84a7b9..37970cc737 100644
--- a/testsuite/tests/typecheck/should_fail/SCLoop.stderr
+++ b/testsuite/tests/typecheck/should_fail/SCLoop.stderr
@@ -1,7 +1,5 @@
SCLoop.hs:22:7:
- No instance for (SC ())
- arising from a use of `op'
- Possible fix: add an instance declaration for (SC ())
+ No instance for (SC ()) arising from a use of `op'
In the expression: op () ([Just True])
In an equation for `foo': foo = op () ([Just True])
diff --git a/testsuite/tests/typecheck/should_fail/T1899.stderr b/testsuite/tests/typecheck/should_fail/T1899.stderr
index d7ab2be5ed..0838984c2f 100644
--- a/testsuite/tests/typecheck/should_fail/T1899.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1899.stderr
@@ -4,6 +4,9 @@ T1899.hs:12:29:
`a' is a rigid type variable bound by
the type signature for transRHS :: [a] -> Int -> Constraint a
at T1899.hs:9:14
+ Relevant bindings include
+ transRHS :: [a] -> Int -> Constraint a (bound at T1899.hs:10:2)
+ varSet :: [a] (bound at T1899.hs:10:11)
In the return type of a call of `Auxiliary'
In the first argument of `Prop', namely `(Auxiliary undefined)'
In the expression: Prop (Auxiliary undefined)
diff --git a/testsuite/tests/typecheck/should_fail/T2414.stderr b/testsuite/tests/typecheck/should_fail/T2414.stderr
index 5fa8f0060a..53ea2b11e3 100644
--- a/testsuite/tests/typecheck/should_fail/T2414.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2414.stderr
@@ -1,6 +1,6 @@
T2414.hs:9:13:
- Occurs check: cannot construct the infinite type: b0 = (Bool, b0)
+ Occurs check: cannot construct the infinite type: b0 ~ (Bool, b0)
Expected type: b0 -> Maybe (Bool, b0)
Actual type: b0 -> Maybe b0
In the first argument of `unfoldr', namely `Just'
diff --git a/testsuite/tests/typecheck/should_fail/T2534.stderr b/testsuite/tests/typecheck/should_fail/T2534.stderr
index bf19e68d04..8943b979ac 100644
--- a/testsuite/tests/typecheck/should_fail/T2534.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2534.stderr
@@ -1,7 +1,8 @@
T2534.hs:3:19:
- Couldn't match expected type `a0 -> a0 -> b0'
- with actual type `[a1]'
+ Couldn't match expected type `a -> a -> b' with actual type `[a0]'
+ Relevant bindings include
+ foo :: a -> a -> b (bound at T2534.hs:3:1)
In the second argument of `foldr', namely `[]'
In the expression: foldr (>>=) [] []
In an equation for `foo': foo = foldr (>>=) [] []
diff --git a/testsuite/tests/typecheck/should_fail/T2688.stderr b/testsuite/tests/typecheck/should_fail/T2688.stderr
index aa896569b9..b937de07b1 100644
--- a/testsuite/tests/typecheck/should_fail/T2688.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2688.stderr
@@ -8,6 +8,10 @@ T2688.hs:8:22:
the class declaration for `VectorSpace' at T2688.hs:5:19
`s' is a rigid type variable bound by
the class declaration for `VectorSpace' at T2688.hs:5:21
+ Relevant bindings include
+ ^/ :: v -> s -> v (bound at T2688.hs:8:5)
+ v :: v (bound at T2688.hs:8:5)
+ s :: s (bound at T2688.hs:8:10)
In the second argument of `(/)', namely `s'
In the second argument of `(*^)', namely `(1 / s)'
In the expression: v *^ (1 / s)
diff --git a/testsuite/tests/typecheck/should_fail/T2714.stderr b/testsuite/tests/typecheck/should_fail/T2714.stderr
index b8d6ae3646..68056509c7 100644
--- a/testsuite/tests/typecheck/should_fail/T2714.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2714.stderr
@@ -6,6 +6,8 @@ T2714.hs:8:5:
at T2714.hs:8:1
Expected type: ((a -> b) -> b) -> c -> a
Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
+ Relevant bindings include
+ f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
In the expression: ffmap
In an equation for `f': f = ffmap
@@ -16,5 +18,7 @@ T2714.hs:8:5:
at T2714.hs:7:6
Expected type: ((a -> b) -> b) -> c -> a
Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
+ Relevant bindings include
+ f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
In the expression: ffmap
In an equation for `f': f = ffmap
diff --git a/testsuite/tests/typecheck/should_fail/T2846b.stderr b/testsuite/tests/typecheck/should_fail/T2846b.stderr
index 56b1a13ab0..b70c4d1a0d 100644
--- a/testsuite/tests/typecheck/should_fail/T2846b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2846b.stderr
@@ -1,6 +1,5 @@
T2846b.hs:5:5:
No instance for (Show (Num a0 => a0)) arising from a use of `show'
- Possible fix: add an instance declaration for (Show (Num a0 => a0))
In the expression: show ([1, 2, 3] :: [Num a => a])
In an equation for `f': f = show ([1, 2, 3] :: [Num a => a])
diff --git a/testsuite/tests/typecheck/should_fail/T3592.stderr b/testsuite/tests/typecheck/should_fail/T3592.stderr
index 477c3aa675..08a02ce8a2 100644
--- a/testsuite/tests/typecheck/should_fail/T3592.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3592.stderr
@@ -1,7 +1,6 @@
T3592.hs:8:5:
No instance for (Show (T a)) arising from a use of `show'
- Possible fix: add an instance declaration for (Show (T a))
In the expression: show
In an equation for `f': f = show
diff --git a/testsuite/tests/typecheck/should_fail/T5300.stderr b/testsuite/tests/typecheck/should_fail/T5300.stderr
index 272f8b5762..728655f88a 100644
--- a/testsuite/tests/typecheck/should_fail/T5300.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5300.stderr
@@ -8,6 +8,9 @@ T5300.hs:15:9:
at T5300.hs:14:7-69
The type variable `c0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
+ Relevant bindings include
+ f2 :: a1 -> StateT (T b2) m a2 (bound at T5300.hs:15:1)
+ fm :: a1 (bound at T5300.hs:15:4)
In the first argument of `(>>=)', namely `f1 fm'
In the expression: f1 fm >>= return . undefined
In an equation for `f2': f2 fm = f1 fm >>= return . undefined
diff --git a/testsuite/tests/typecheck/should_fail/T5570.stderr b/testsuite/tests/typecheck/should_fail/T5570.stderr
index 9daf268168..e69cbd588a 100644
--- a/testsuite/tests/typecheck/should_fail/T5570.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5570.stderr
@@ -1,6 +1,6 @@
-
-T5570.hs:7:16:
- Couldn't match kind `#' against `*'
- In the second argument of `($)', namely `D# $ 3.0##'
- In the expression: print $ D# $ 3.0##
- In an equation for `main': main = print $ D# $ 3.0##
+
+T5570.hs:7:16:
+ Couldn't match expected kind `*' with actual kind `#'
+ In the second argument of `($)', namely `D# $ 3.0##'
+ In the expression: print $ D# $ 3.0##
+ In an equation for `main': main = print $ D# $ 3.0##
diff --git a/testsuite/tests/typecheck/should_fail/T5684.stderr b/testsuite/tests/typecheck/should_fail/T5684.stderr
index 0aa8b17973..c0575fd5a3 100644
--- a/testsuite/tests/typecheck/should_fail/T5684.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5684.stderr
@@ -1,10 +1,78 @@
-
-T5684.hs:53:12:
- No instance for (A Bool)
- arising from a use of `op'
- Possible fix: add an instance declaration for (A Bool)
- In the expression: op False False
- In the expression:
- [op True undefined, op False False, op 'c' undefined]
- In an equation for `flop6':
- flop6 = [op True undefined, op False False, op 'c' undefined]
+
+T5684.hs:25:12:
+ No instance for (A b6) arising from a use of `op'
+ The type variable `b6' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the expression: op True undefined
+ In the expression:
+ [op False False, op 'c' undefined, op True undefined]
+ In an equation for `flop1':
+ flop1 = [op False False, op 'c' undefined, op True undefined]
+
+T5684.hs:30:12:
+ No instance for (A b5) arising from a use of `op'
+ The type variable `b5' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the expression: op True undefined
+ In the expression:
+ [op False False, op True undefined, op 'c' undefined]
+ In an equation for `flop2':
+ flop2 = [op False False, op True undefined, op 'c' undefined]
+
+T5684.hs:36:12:
+ No instance for (A b4) arising from a use of `op'
+ The type variable `b4' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the expression: op True undefined
+ In the expression:
+ [op 'c' undefined, op True undefined, op False False]
+ In an equation for `flop3':
+ flop3 = [op 'c' undefined, op True undefined, op False False]
+
+T5684.hs:42:12:
+ No instance for (A b3) arising from a use of `op'
+ The type variable `b3' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the expression: op True undefined
+ In the expression:
+ [op 'c' undefined, op False False, op True undefined]
+ In an equation for `flop4':
+ flop4 = [op 'c' undefined, op False False, op True undefined]
+
+T5684.hs:46:12:
+ No instance for (A b2) arising from a use of `op'
+ The type variable `b2' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the expression: op True undefined
+ In the expression:
+ [op True undefined, op 'c' undefined, op False False]
+ In an equation for `flop5':
+ flop5 = [op True undefined, op 'c' undefined, op False False]
+
+T5684.hs:52:12:
+ No instance for (A b0) arising from a use of `op'
+ The type variable `b0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the expression: op True undefined
+ In the expression:
+ [op True undefined, op False False, op 'c' undefined]
+ In an equation for `flop6':
+ flop6 = [op True undefined, op False False, op 'c' undefined]
+
+T5684.hs:53:12:
+ No instance for (A Bool) arising from a use of `op'
+ In the expression: op False False
+ In the expression:
+ [op True undefined, op False False, op 'c' undefined]
+ In an equation for `flop6':
+ flop6 = [op True undefined, op False False, op 'c' undefined]
+
+T5684.hs:54:12:
+ No instance for (B Char b1) arising from a use of `op'
+ The type variable `b1' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the expression: op 'c' undefined
+ In the expression:
+ [op True undefined, op False False, op 'c' undefined]
+ In an equation for `flop6':
+ flop6 = [op True undefined, op False False, op 'c' undefined]
diff --git a/testsuite/tests/typecheck/should_fail/T5689.stderr b/testsuite/tests/typecheck/should_fail/T5689.stderr
index 28f9c01940..48e923bd65 100644
--- a/testsuite/tests/typecheck/should_fail/T5689.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5689.stderr
@@ -1,6 +1,9 @@
T5689.hs:10:36:
Couldn't match expected type `t' with actual type `Bool'
+ Relevant bindings include
+ r :: IORef (t -> t) (bound at T5689.hs:7:14)
+ v :: t (bound at T5689.hs:10:28)
In the expression: v
In the expression: if v then False else True
In the second argument of `writeIORef', namely
diff --git a/testsuite/tests/typecheck/should_fail/T5853.stderr b/testsuite/tests/typecheck/should_fail/T5853.stderr
index eeba39fb1d..6ee736c0b6 100644
--- a/testsuite/tests/typecheck/should_fail/T5853.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5853.stderr
@@ -1,14 +1,17 @@
T5853.hs:15:52:
- Could not deduce (fb ~ Subst fa1 (Elem fb))
+ Could not deduce (Subst fa b ~ Subst (Subst fa a) b)
from the context (F fa,
- Subst fa (Elem fb) ~ fb,
- Subst fb (Elem fa) ~ fa,
- F fa1,
- Subst fa1 (Elem fa) ~ fa,
- Subst fa (Elem fa1) ~ fa1)
+ Elem (Subst fa b) ~ b,
+ Subst (Subst fa b) (Elem fa) ~ fa,
+ F (Subst fa a),
+ Elem (Subst fa a) ~ a,
+ Subst (Subst fa a) (Elem fa) ~ fa)
bound by the RULE "map/map" at T5853.hs:15:2-57
- `fb' is a rigid type variable bound by
- the RULE "map/map" at T5853.hs:15:2
+ NB: `Subst' is a type function, and may not be injective
+ Relevant bindings include
+ xs :: Subst fa a (bound at T5853.hs:15:23)
+ g :: a -> Elem fa (bound at T5853.hs:15:21)
+ f :: Elem fa -> b (bound at T5853.hs:15:19)
In the expression: (f . g) <$> xs
When checking the transformation rule "map/map"
diff --git a/testsuite/tests/typecheck/should_fail/T5858.stderr b/testsuite/tests/typecheck/should_fail/T5858.stderr
index 5e0cf1521b..0ce0d5df9f 100644
--- a/testsuite/tests/typecheck/should_fail/T5858.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5858.stderr
@@ -7,7 +7,5 @@ T5858.hs:11:7:
Note: there is a potential instance available:
instance t1 ~ String => InferOverloaded (t1, t1)
-- Defined at T5858.hs:8:10
- Possible fix:
- add an instance declaration for (InferOverloaded ([a0], [a1]))
In the expression: infer ([], [])
In an equation for `foo': foo = infer ([], [])
diff --git a/testsuite/tests/typecheck/should_fail/mc20.stderr b/testsuite/tests/typecheck/should_fail/mc20.stderr
index ee9bb4b39f..01048c4481 100644
--- a/testsuite/tests/typecheck/should_fail/mc20.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc20.stderr
@@ -1,8 +1,6 @@
mc20.hs:14:31:
- No instance for (Ord Unorderable)
- arising from a use of `groupWith'
- Possible fix: add an instance declaration for (Ord Unorderable)
+ No instance for (Ord Unorderable) arising from a use of `groupWith'
In the expression: groupWith
In a stmt of a monad comprehension: then group by x using groupWith
In the expression:
diff --git a/testsuite/tests/typecheck/should_fail/mc22.stderr b/testsuite/tests/typecheck/should_fail/mc22.stderr
index 6a3474c64f..d020bae094 100644
--- a/testsuite/tests/typecheck/should_fail/mc22.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc22.stderr
@@ -1,10 +1,11 @@
-
-mc22.hs:10:26:
- Couldn't match type `a' with `t0 a'
- `a' is a rigid type variable bound by
- a type expected by the context: [a] -> [t0 a] at mc22.hs:10:9
- Expected type: [a] -> [t0 a]
- Actual type: [a] -> [a]
- In the return type of a call of `take'
- In the expression: take 5
- In a stmt of a monad comprehension: then group using take 5
+
+mc22.hs:10:26:
+ Couldn't match type `a' with `t a'
+ `a' is a rigid type variable bound by
+ a type expected by the context: [a] -> [t a] at mc22.hs:10:9
+ Expected type: [a] -> [t a]
+ Actual type: [a] -> [a]
+ Relevant bindings include foo :: [t [Char]] (bound at mc22.hs:8:1)
+ In the return type of a call of `take'
+ In the expression: take 5
+ In a stmt of a monad comprehension: then group using take 5
diff --git a/testsuite/tests/typecheck/should_fail/mc23.stderr b/testsuite/tests/typecheck/should_fail/mc23.stderr
index 632bac92c8..b8c3987280 100644
--- a/testsuite/tests/typecheck/should_fail/mc23.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc23.stderr
@@ -1,9 +1,10 @@
-
-mc23.hs:9:29:
- Couldn't match type `[a0]' with `a -> b0'
- Expected type: (a -> b0) -> [a] -> t0 a
- Actual type: [a0] -> [a0]
- In the return type of a call of `take'
- Probable cause: `take' is applied to too many arguments
- In the expression: take 5
- In a stmt of a monad comprehension: then take 5 by x
+
+mc23.hs:9:29:
+ Couldn't match type `[a0]' with `a -> b'
+ Expected type: (a -> b) -> [a] -> t a
+ Actual type: [a0] -> [a0]
+ Relevant bindings include z :: t b (bound at mc23.hs:9:1)
+ In the return type of a call of `take'
+ Probable cause: `take' is applied to too many arguments
+ In the expression: take 5
+ In a stmt of a monad comprehension: then take 5 by x
diff --git a/testsuite/tests/typecheck/should_fail/mc24.stderr b/testsuite/tests/typecheck/should_fail/mc24.stderr
index a2b11e2465..1249bc2f39 100644
--- a/testsuite/tests/typecheck/should_fail/mc24.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc24.stderr
@@ -1,9 +1,9 @@
-
-mc24.hs:10:31:
- Couldn't match type `[a0]' with `a -> a1'
- Expected type: (a -> a1) -> [a] -> t0 [a]
- Actual type: [a0] -> [a0]
- In the return type of a call of `take'
- Probable cause: `take' is applied to too many arguments
- In the expression: take 2
- In a stmt of a monad comprehension: then group by x using take 2
+
+mc24.hs:10:31:
+ Couldn't match type `[a0]' with `a -> Integer'
+ Expected type: (a -> Integer) -> [a] -> t [a]
+ Actual type: [a0] -> [a0]
+ In the return type of a call of `take'
+ Probable cause: `take' is applied to too many arguments
+ In the expression: take 2
+ In a stmt of a monad comprehension: then group by x using take 2
diff --git a/testsuite/tests/typecheck/should_fail/mc25.stderr b/testsuite/tests/typecheck/should_fail/mc25.stderr
index 643f35278d..3925f833f0 100644
--- a/testsuite/tests/typecheck/should_fail/mc25.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc25.stderr
@@ -1,8 +1,9 @@
-
-mc25.hs:9:46:
- Couldn't match type `Int' with `a -> t0'
- Expected type: (a -> t0) -> [a] -> [t1 a]
- Actual type: Int -> [a] -> [a]
- In the expression: take
- 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]
+ Actual type: Int -> [a] -> [a]
+ Relevant bindings include z :: [t1 t] (bound at mc25.hs:9:1)
+ In the expression: take
+ 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]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail001.stderr b/testsuite/tests/typecheck/should_fail/tcfail001.stderr
index 7c9b8ba27b..85b6788a7f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail001.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail001.stderr
@@ -1,6 +1,7 @@
tcfail001.hs:9:2:
Couldn't match expected type `[t0] -> [a0]' with actual type `[a]'
+ Relevant bindings include op :: [a] (bound at tcfail001.hs:9:2)
The equation(s) for `op' have one argument,
but its type `[a]' has none
In the instance declaration for `A [a]'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail002.stderr b/testsuite/tests/typecheck/should_fail/tcfail002.stderr
index 12a77d0cc8..3a9c89c13d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail002.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail002.stderr
@@ -1,5 +1,8 @@
tcfail002.hs:4:7:
- Occurs check: cannot construct the infinite type: t0 = [t0]
+ Occurs check: cannot construct the infinite type: t ~ [t]
+ Relevant bindings include
+ c :: [t] -> t (bound at tcfail002.hs:3:1)
+ z :: [t] (bound at tcfail002.hs:4:3)
In the expression: z
In an equation for `c': c z = z
diff --git a/testsuite/tests/typecheck/should_fail/tcfail003.stderr b/testsuite/tests/typecheck/should_fail/tcfail003.stderr
index 62fb6a9812..42d7c59764 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail003.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail003.stderr
@@ -1,8 +1,6 @@
tcfail003.hs:3:10:
- No instance for (Num Char)
- arising from the literal `1'
- Possible fix: add an instance declaration for (Num Char)
+ No instance for (Num Char) arising from the literal `1'
In the expression: 1
In the expression: [1, 'a']
In a pattern binding: (d : e) = [1, 'a']
diff --git a/testsuite/tests/typecheck/should_fail/tcfail004.stderr b/testsuite/tests/typecheck/should_fail/tcfail004.stderr
index 5f0408880c..db24fb2109 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail004.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail004.stderr
@@ -1,6 +1,9 @@
tcfail004.hs:3:9:
- Couldn't match expected type `(t0, t1)'
- with actual type `(t2, t3, t4)'
+ Couldn't match expected type `(t, t1)'
+ with actual type `(Integer, Integer, Integer)'
+ Relevant bindings include
+ g :: t1 (bound at tcfail004.hs:3:4)
+ f :: t (bound at tcfail004.hs:3:2)
In the expression: (1, 2, 3)
In a pattern binding: (f, g) = (1, 2, 3)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail005.stderr b/testsuite/tests/typecheck/should_fail/tcfail005.stderr
index 66e6fa9f69..9cfae02e1f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail005.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail005.stderr
@@ -1,5 +1,9 @@
tcfail005.hs:3:9:
- Couldn't match expected type `[t0]' with actual type `(t1, Char)'
+ Couldn't match expected type `[t]'
+ with actual type `(Integer, Char)'
+ Relevant bindings include
+ i :: [t] (bound at tcfail005.hs:3:4)
+ h :: t (bound at tcfail005.hs:3:2)
In the expression: (1, 'a')
In a pattern binding: (h : i) = (1, 'a')
diff --git a/testsuite/tests/typecheck/should_fail/tcfail006.stderr b/testsuite/tests/typecheck/should_fail/tcfail006.stderr
index d9ab68bcda..a31f4fdc21 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail006.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail006.stderr
@@ -1,8 +1,6 @@
-
-tcfail006.hs:4:24:
- No instance for (Num Bool)
- arising from the literal `1'
- Possible fix: add an instance declaration for (Num Bool)
- In the expression: 1
- In the expression: (True, 1)
- In a case alternative: True -> (True, 1)
+
+tcfail006.hs:4:24:
+ No instance for (Num Bool) arising from the literal `1'
+ In the expression: 1
+ In the expression: (True, 1)
+ In a case alternative: True -> (True, 1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail007.stderr b/testsuite/tests/typecheck/should_fail/tcfail007.stderr
index 6f93a462a2..d375e40eb2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail007.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail007.stderr
@@ -1,10 +1,8 @@
-
-tcfail007.hs:3:15:
- No instance for (Num Bool)
- arising from a use of `+'
- Possible fix: add an instance declaration for (Num Bool)
- In the expression: x + 1
- In an equation for `n':
- n x
- | True = x + 1
- | False = True
+
+tcfail007.hs:3:15:
+ No instance for (Num Bool) arising from a use of `+'
+ In the expression: x + 1
+ In an equation for `n':
+ n x
+ | True = x + 1
+ | False = True
diff --git a/testsuite/tests/typecheck/should_fail/tcfail008.stderr b/testsuite/tests/typecheck/should_fail/tcfail008.stderr
index 978d946970..c0791f2b2e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail008.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail008.stderr
@@ -2,10 +2,10 @@
tcfail008.hs:3:5:
No instance for (Num a0) arising from the literal `1'
The type variable `a0' is ambiguous
- Possible cause: the monomorphism restriction applied to the following:
- o :: [a0] (bound at tcfail008.hs:3:1)
+ Possible cause: the monomorphism restriction applied to: `o'
Probable fix: give these definition(s) an explicit type signature
or use -XNoMonomorphismRestriction
+ Relevant bindings include o :: [a0] (bound at tcfail008.hs:3:1)
Note: there are several potential instances:
instance Num Double -- Defined in `GHC.Float'
instance Num Float -- Defined in `GHC.Float'
@@ -18,7 +18,6 @@ tcfail008.hs:3:5:
tcfail008.hs:3:7:
No instance for (Num [a0]) arising from the literal `2'
- Possible fix: add an instance declaration for (Num [a0])
In the second argument of `(:)', namely `2'
In the expression: 1 : 2
In an equation for `o': o = 1 : 2
diff --git a/testsuite/tests/typecheck/should_fail/tcfail010.stderr b/testsuite/tests/typecheck/should_fail/tcfail010.stderr
index 5f22a3a20e..695655c31e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail010.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail010.stderr
@@ -1,7 +1,6 @@
tcfail010.hs:3:17:
No instance for (Num [t0]) arising from a use of `+'
- Possible fix: add an instance declaration for (Num [t0])
In the expression: z + 2
In the expression: \ (y : z) -> z + 2
In an equation for `q': q = \ (y : z) -> z + 2
diff --git a/testsuite/tests/typecheck/should_fail/tcfail013.stderr b/testsuite/tests/typecheck/should_fail/tcfail013.stderr
index 439a663c5c..a1fd433f67 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail013.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail013.stderr
@@ -1,5 +1,6 @@
tcfail013.hs:4:3:
- Couldn't match expected type `[t0]' with actual type `Bool'
+ Couldn't match expected type `[t]' with actual type `Bool'
+ Relevant bindings include f :: [t] -> a (bound at tcfail013.hs:3:1)
In the pattern: True
In an equation for `f': f True = 2
diff --git a/testsuite/tests/typecheck/should_fail/tcfail014.stderr b/testsuite/tests/typecheck/should_fail/tcfail014.stderr
index d46bf92db3..713ffce5e5 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail014.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail014.stderr
@@ -1,6 +1,9 @@
tcfail014.hs:5:33:
- Occurs check: cannot construct the infinite type: t1 = t1 -> t0
+ Occurs check: cannot construct the infinite type: t8 ~ t8 -> t7
+ Relevant bindings include
+ h :: (t8 -> t7) -> t7 (bound at tcfail014.hs:5:25)
+ z :: t8 -> t7 (bound at tcfail014.hs:5:27)
In the first argument of `z', namely `z'
In the expression: z z
In an equation for `h': h z = z z
diff --git a/testsuite/tests/typecheck/should_fail/tcfail015.stderr b/testsuite/tests/typecheck/should_fail/tcfail015.stderr
index 24affd76d9..41899dffb4 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail015.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail015.stderr
@@ -1,7 +1,5 @@
-
-tcfail015.hs:7:13:
- No instance for (Num Bool)
- arising from the literal `2'
- Possible fix: add an instance declaration for (Num Bool)
- In the expression: 2
- In an equation for `g': g (ANull) = 2
+
+tcfail015.hs:7:13:
+ No instance for (Num Bool) arising from the literal `2'
+ In the expression: 2
+ In an equation for `g': g (ANull) = 2
diff --git a/testsuite/tests/typecheck/should_fail/tcfail016.stderr b/testsuite/tests/typecheck/should_fail/tcfail016.stderr
index 6c1fa9ce62..17f2f16e4c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail016.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail016.stderr
@@ -1,16 +1,24 @@
tcfail016.hs:9:20:
- Couldn't match type `(t0, Expr t0)' with `Expr t0'
- Expected type: Expr t0
- Actual type: AnnExpr t0
+ Couldn't match type `(t, Expr t)' with `Expr t'
+ Expected type: Expr t
+ Actual type: AnnExpr t
+ Relevant bindings include
+ g :: Expr t -> [[Char]] (bound at tcfail016.hs:8:1)
+ e1 :: AnnExpr t (bound at tcfail016.hs:9:8)
+ e2 :: AnnExpr t (bound at tcfail016.hs:9:11)
In the first argument of `g', namely `e1'
In the first argument of `(++)', namely `(g e1)'
In the expression: (g e1) ++ (g e2)
tcfail016.hs:9:28:
- Couldn't match type `(t0, Expr t0)' with `Expr t0'
- Expected type: Expr t0
- Actual type: AnnExpr t0
+ Couldn't match type `(t, Expr t)' with `Expr t'
+ Expected type: Expr t
+ Actual type: AnnExpr t
+ Relevant bindings include
+ g :: Expr t -> [[Char]] (bound at tcfail016.hs:8:1)
+ e1 :: AnnExpr t (bound at tcfail016.hs:9:8)
+ e2 :: AnnExpr t (bound at tcfail016.hs:9:11)
In the first argument of `g', namely `e2'
In the second argument of `(++)', namely `(g e2)'
In the expression: (g e1) ++ (g e2)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail017.stderr b/testsuite/tests/typecheck/should_fail/tcfail017.stderr
index 9ac3c7d64f..006ff73d14 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail017.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail017.stderr
@@ -4,5 +4,4 @@ tcfail017.hs:10:10:
arising from the superclasses of an instance declaration
from the context (B a)
bound by the instance declaration at tcfail017.hs:10:10-23
- Possible fix: add an instance declaration for (C [a])
In the instance declaration for `B [a]'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail018.stderr b/testsuite/tests/typecheck/should_fail/tcfail018.stderr
index 54df69888e..67b3cbb47e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail018.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail018.stderr
@@ -1,6 +1,5 @@
tcfail018.hs:5:10:
No instance for (Num [t0]) arising from the literal `1'
- Possible fix: add an instance declaration for (Num [t0])
In the expression: 1
In a pattern binding: (a : []) = 1
diff --git a/testsuite/tests/typecheck/should_fail/tcfail019.stderr b/testsuite/tests/typecheck/should_fail/tcfail019.stderr
index ac2178be97..79ab411795 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail019.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail019.stderr
@@ -2,5 +2,4 @@
tcfail019.hs:18:10:
No instance for (B [a])
arising from the superclasses of an instance declaration
- Possible fix: add an instance declaration for (B [a])
In the instance declaration for `D [a]'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail020.stderr b/testsuite/tests/typecheck/should_fail/tcfail020.stderr
index f15fd98084..13ef851ed6 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail020.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail020.stderr
@@ -4,5 +4,4 @@ tcfail020.hs:10:10:
arising from the superclasses of an instance declaration
from the context (A a)
bound by the instance declaration at tcfail020.hs:10:10-23
- Possible fix: add an instance declaration for (A [a])
In the instance declaration for `B [a]'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail029.stderr b/testsuite/tests/typecheck/should_fail/tcfail029.stderr
index cf83c561b9..d9cb862388 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail029.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail029.stderr
@@ -1,7 +1,5 @@
tcfail029.hs:6:9:
- No instance for (Ord Foo)
- arising from a use of `>'
- Possible fix: add an instance declaration for (Ord Foo)
+ No instance for (Ord Foo) arising from a use of `>'
In the expression: x > Bar
In an equation for `f': f x = x > Bar
diff --git a/testsuite/tests/typecheck/should_fail/tcfail032.stderr b/testsuite/tests/typecheck/should_fail/tcfail032.stderr
index 8cb4c1b99a..09d69ca13a 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail032.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail032.stderr
@@ -1,14 +1,12 @@
tcfail032.hs:14:8:
- Could not deduce (t ~ (a1 -> Int))
- from the context (Eq a)
- bound by the inferred type of f :: Eq a => t -> a -> Int
- at tcfail032.hs:14:1-31
- or from (Eq a1)
- bound by an expression type signature: Eq a1 => a1 -> Int
+ Couldn't match expected type `t' with actual type `a1 -> Int'
+ because type variable `a1' would escape its scope
+ This (rigid, skolem) type variable is bound by
+ an expression type signature: Eq a1 => a1 -> Int
at tcfail032.hs:14:8-30
- `t' is a rigid type variable bound by
- the inferred type of f :: Eq a => t -> a -> Int
- at tcfail032.hs:14:1
+ Relevant bindings include
+ f :: t -> a -> Int (bound at tcfail032.hs:14:1)
+ x :: t (bound at tcfail032.hs:14:3)
In the expression: (x :: Eq a => a -> Int)
In an equation for `f': f x = (x :: Eq a => a -> Int)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail033.stderr b/testsuite/tests/typecheck/should_fail/tcfail033.stderr
index 826ad4626d..5382284334 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail033.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail033.stderr
@@ -1,6 +1,10 @@
tcfail033.hs:4:12:
- Occurs check: cannot construct the infinite type: t0 = (t0, t1)
+ Occurs check: cannot construct the infinite type: t ~ (t, t1)
+ Relevant bindings include
+ buglet :: [(t, t1)] (bound at tcfail033.hs:4:1)
+ x :: t (bound at tcfail033.hs:4:17)
+ y :: t1 (bound at tcfail033.hs:4:19)
In the expression: x
In the expression: [x | (x, y) <- buglet]
In an equation for `buglet': buglet = [x | (x, y) <- buglet]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail043.stderr b/testsuite/tests/typecheck/should_fail/tcfail043.stderr
index 3e52e69c56..606750091b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail043.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail043.stderr
@@ -2,10 +2,13 @@
tcfail043.hs:38:17:
No instance for (Ord_ a0) arising from a use of `gt'
The type variable `a0' is ambiguous
- Possible cause: the monomorphism restriction applied to the following:
- search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
+ Possible cause: the monomorphism restriction applied to: `search'
Probable fix: give these definition(s) an explicit type signature
or use -XNoMonomorphismRestriction
+ Relevant bindings include
+ search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
+ a :: a0 (bound at tcfail043.hs:38:6)
+ bs :: [a0] (bound at tcfail043.hs:38:8)
Note: there is a potential instance available:
instance Ord_ Int -- Defined at tcfail043.hs:34:10
In the expression: gt (hd bs) a
@@ -24,10 +27,13 @@ tcfail043.hs:38:17:
tcfail043.hs:40:25:
No instance for (Eq_ a0) arising from a use of `eq'
The type variable `a0' is ambiguous
- Possible cause: the monomorphism restriction applied to the following:
- search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
+ Possible cause: the monomorphism restriction applied to: `search'
Probable fix: give these definition(s) an explicit type signature
or use -XNoMonomorphismRestriction
+ Relevant bindings include
+ search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
+ a :: a0 (bound at tcfail043.hs:38:6)
+ bs :: [a0] (bound at tcfail043.hs:38:8)
Note: there are several potential instances:
instance Eq_ a => Eq_ [a] -- Defined at tcfail043.hs:23:10
instance Eq_ Int -- Defined at tcfail043.hs:20:10
diff --git a/testsuite/tests/typecheck/should_fail/tcfail046.stderr b/testsuite/tests/typecheck/should_fail/tcfail046.stderr
index 1b668d07a6..e3a8f169e2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail046.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail046.stderr
@@ -3,16 +3,14 @@ tcfail046.hs:10:50:
No instance for (Eq (Process a))
arising from the 'deriving' clause of a data type declaration
Possible fix:
- add an instance declaration for (Eq (Process a))
- or use a standalone 'deriving instance' declaration,
- so you can specify the instance context yourself
+ use a standalone 'deriving instance' declaration,
+ so you can specify the instance context yourself
When deriving the instance for (Eq (Continuation a))
tcfail046.hs:22:25:
No instance for (Eq (Process a))
arising from the 'deriving' clause of a data type declaration
Possible fix:
- add an instance declaration for (Eq (Process a))
- or use a standalone 'deriving instance' declaration,
- so you can specify the instance context yourself
+ use a standalone 'deriving instance' declaration,
+ so you can specify the instance context yourself
When deriving the instance for (Eq (Message a))
diff --git a/testsuite/tests/typecheck/should_fail/tcfail065.stderr b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
index fbe7e545c1..ae19816537 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail065.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
@@ -1,11 +1,14 @@
-
-tcfail065.hs:29:20:
- Couldn't match expected type `x' with actual type `x1'
- `x' is a rigid type variable bound by
- the instance declaration at tcfail065.hs:28:10
- `x1' is a rigid type variable bound by
- the type signature for setX :: x1 -> X x -> X x
- at tcfail065.hs:29:3
- In the first argument of `X', namely `x'
- In the expression: X x
- In an equation for `setX': setX x (X _) = X x
+
+tcfail065.hs:29:20:
+ Couldn't match expected type `x' with actual type `x1'
+ `x' is a rigid type variable bound by
+ the instance declaration at tcfail065.hs:28:10
+ `x1' is a rigid type variable bound by
+ the type signature for setX :: x1 -> X x -> X x
+ at tcfail065.hs:29:3
+ Relevant bindings include
+ setX :: x1 -> X x -> X x (bound at tcfail065.hs:29:3)
+ x :: x1 (bound at tcfail065.hs:29:8)
+ In the first argument of `X', namely `x'
+ In the expression: X x
+ In an equation for `setX': setX x (X _) = X x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail068.stderr b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
index bf6e1448bd..687c8eaca7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail068.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
@@ -1,97 +1,127 @@
-
-tcfail068.hs:14:9:
- Could not deduce (s1 ~ s)
- from the context (Constructed a)
- bound by the type signature for
- itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
- at tcfail068.hs:11:10-55
- `s1' is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (IndTree s a)
- at tcfail068.hs:13:9
- `s' is a rigid type variable bound by
- the type signature for
- itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
- at tcfail068.hs:11:10
- Expected type: GHC.ST.ST s1 (IndTree s a)
- Actual type: GHC.ST.ST s1 (STArray s1 (Int, Int) a)
- In the return type of a call of `newSTArray'
- In the first argument of `runST', namely
- `(newSTArray ((1, 1), n) x)'
- In the expression: runST (newSTArray ((1, 1), n) x)
-
-tcfail068.hs:19:21:
- Could not deduce (s ~ s1)
- from the context (Constructed a)
- bound by the type signature for
- itiap :: Constructed a =>
- (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:16:10-75
- `s' is a rigid type variable bound by
- the type signature for
- itiap :: Constructed a =>
- (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:16:10
- `s1' is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (IndTree s a)
- at tcfail068.hs:18:9
- Expected type: STArray s1 (Int, Int) a
- Actual type: IndTree s a
- In the first argument of `readSTArray', namely `arr'
- In the first argument of `(>>=)', namely `readSTArray arr i'
- In the first argument of `runST', namely
- `(readSTArray arr i
- >>= \ val -> writeSTArray arr i (f val) >> return arr)'
-
-tcfail068.hs:24:35:
- Could not deduce (s ~ s1)
- from the context (Constructed a)
- bound by the type signature for
- itrap :: Constructed a =>
- ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:23:10-87
- `s' is a rigid type variable bound by
- the type signature for
- itrap :: Constructed a =>
- ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:23:10
- `s1' is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (IndTree s a)
- at tcfail068.hs:24:29
- Expected type: GHC.ST.ST s1 (IndTree s a)
- Actual type: GHC.ST.ST s (IndTree s a)
- In the return type of a call of itrap'
- In the first argument of `runST', namely `(itrap' i k)'
- In the expression: runST (itrap' i k)
-
-tcfail068.hs:36:46:
- Could not deduce (s ~ s1)
- from the context (Constructed b)
- bound by the type signature for
- itrapstate :: Constructed b =>
- ((Int, Int), (Int, Int))
- -> (a -> b -> (a, b))
- -> ((Int, Int) -> c -> a)
- -> (a -> c)
- -> c
- -> IndTree s b
- -> (c, IndTree s b)
- at tcfail068.hs:(34,15)-(35,62)
- `s' is a rigid type variable bound by
- the type signature for
- itrapstate :: Constructed b =>
- ((Int, Int), (Int, Int))
- -> (a -> b -> (a, b))
- -> ((Int, Int) -> c -> a)
- -> (a -> c)
- -> c
- -> IndTree s b
- -> (c, IndTree s b)
- at tcfail068.hs:34:15
- `s1' is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (c, IndTree s b)
- at tcfail068.hs:36:40
- Expected type: GHC.ST.ST s1 (c, IndTree s b)
- Actual type: GHC.ST.ST s (c, IndTree s b)
- In the return type of a call of itrapstate'
- In the first argument of `runST', namely `(itrapstate' i k s)'
- In the expression: runST (itrapstate' i k s)
+
+tcfail068.hs:14:9:
+ Could not deduce (s1 ~ s)
+ from the context (Constructed a)
+ bound by the type signature for
+ itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
+ at tcfail068.hs:11:10-55
+ `s1' is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (IndTree s a)
+ at tcfail068.hs:13:9
+ `s' is a rigid type variable bound by
+ the type signature for
+ itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
+ at tcfail068.hs:11:10
+ Expected type: GHC.ST.ST s1 (IndTree s a)
+ Actual type: GHC.ST.ST s1 (STArray s1 (Int, Int) a)
+ Relevant bindings include
+ itgen :: (Int, Int) -> a -> IndTree s a
+ (bound at tcfail068.hs:12:1)
+ In the return type of a call of `newSTArray'
+ In the first argument of `runST', namely
+ `(newSTArray ((1, 1), n) x)'
+ In the expression: runST (newSTArray ((1, 1), n) x)
+
+tcfail068.hs:19:21:
+ Could not deduce (s ~ s1)
+ from the context (Constructed a)
+ bound by the type signature for
+ itiap :: Constructed a =>
+ (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
+ at tcfail068.hs:16:10-75
+ `s' is a rigid type variable bound by
+ the type signature for
+ itiap :: Constructed a =>
+ (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
+ at tcfail068.hs:16:10
+ `s1' is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (IndTree s a)
+ at tcfail068.hs:18:9
+ Expected type: STArray s1 (Int, Int) a
+ Actual type: IndTree s a
+ Relevant bindings include
+ itiap :: (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
+ (bound at tcfail068.hs:17:1)
+ arr :: IndTree s a (bound at tcfail068.hs:17:11)
+ In the first argument of `readSTArray', namely `arr'
+ In the first argument of `(>>=)', namely `readSTArray arr i'
+ In the first argument of `runST', namely
+ `(readSTArray arr i
+ >>= \ val -> writeSTArray arr i (f val) >> return arr)'
+
+tcfail068.hs:24:35:
+ Could not deduce (s ~ s1)
+ from the context (Constructed a)
+ bound by the type signature for
+ itrap :: Constructed a =>
+ ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
+ at tcfail068.hs:23:10-87
+ `s' is a rigid type variable bound by
+ the type signature for
+ itrap :: Constructed a =>
+ ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
+ at tcfail068.hs:23:10
+ `s1' is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (IndTree s a)
+ at tcfail068.hs:24:29
+ Expected type: GHC.ST.ST s1 (IndTree s a)
+ Actual type: GHC.ST.ST s (IndTree s a)
+ Relevant bindings include
+ itrap :: ((Int, Int), (Int, Int))
+ -> (a -> a) -> IndTree s a -> IndTree s a
+ (bound at tcfail068.hs:24:1)
+ arr :: IndTree s a (bound at tcfail068.hs:24:23)
+ itrapsnd :: Int -> Int -> GHC.ST.ST s (IndTree s a)
+ (bound at tcfail068.hs:29:9)
+ itrap' :: Int -> Int -> GHC.ST.ST s (IndTree s a)
+ (bound at tcfail068.hs:26:9)
+ In the return type of a call of itrap'
+ In the first argument of `runST', namely `(itrap' i k)'
+ In the expression: runST (itrap' i k)
+
+tcfail068.hs:36:46:
+ Could not deduce (s ~ s1)
+ from the context (Constructed b)
+ bound by the type signature for
+ itrapstate :: Constructed b =>
+ ((Int, Int), (Int, Int))
+ -> (a -> b -> (a, b))
+ -> ((Int, Int) -> c -> a)
+ -> (a -> c)
+ -> c
+ -> IndTree s b
+ -> (c, IndTree s b)
+ at tcfail068.hs:(34,15)-(35,62)
+ `s' is a rigid type variable bound by
+ the type signature for
+ itrapstate :: Constructed b =>
+ ((Int, Int), (Int, Int))
+ -> (a -> b -> (a, b))
+ -> ((Int, Int) -> c -> a)
+ -> (a -> c)
+ -> c
+ -> IndTree s b
+ -> (c, IndTree s b)
+ at tcfail068.hs:34:15
+ `s1' is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (c, IndTree s b)
+ at tcfail068.hs:36:40
+ Expected type: GHC.ST.ST s1 (c, IndTree s b)
+ Actual type: GHC.ST.ST s (c, IndTree s b)
+ Relevant bindings include
+ itrapstate :: ((Int, Int), (Int, Int))
+ -> (a -> b -> (a, b))
+ -> ((Int, Int) -> c -> a)
+ -> (a -> c)
+ -> c
+ -> IndTree s b
+ -> (c, IndTree s b)
+ (bound at tcfail068.hs:36:1)
+ arr :: IndTree s b (bound at tcfail068.hs:36:34)
+ itrapstatesnd :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
+ (bound at tcfail068.hs:41:9)
+ itrapstate' :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
+ (bound at tcfail068.hs:38:9)
+ In the return type of a call of itrapstate'
+ In the first argument of `runST', namely `(itrapstate' i k s)'
+ In the expression: runST (itrapstate' i k s)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail076.stderr b/testsuite/tests/typecheck/should_fail/tcfail076.stderr
index 4ca4cf403b..5e8361aa66 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail076.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail076.stderr
@@ -9,6 +9,9 @@ tcfail076.hs:18:82:
at tcfail076.hs:18:64
Expected type: m res1
Actual type: m res
+ Relevant bindings include
+ cont :: a -> m res (bound at tcfail076.hs:18:37)
+ cont' :: b -> m res1 (bound at tcfail076.hs:18:73)
In the return type of a call of `cont'
In the expression: cont a
In the first argument of `KContT', namely `(\ cont' -> cont a)'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail083.stderr b/testsuite/tests/typecheck/should_fail/tcfail083.stderr
index 77794ffaa6..589d2c9959 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail083.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail083.stderr
@@ -5,3 +5,17 @@ tcfail083.hs:8:39:
In the pattern: State {bar = Bar {flag = f, baz = b}}
In an equation for `display':
display (State {bar = Bar {flag = f, baz = b}}) = print (f, b)
+
+tcfail083.hs:8:53:
+ No instance for (Show t0) arising from a use of `print'
+ The type variable `t0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Relevant bindings include b :: t0 (bound at tcfail083.hs:8:45)
+ Note: there are several potential instances:
+ instance Show Bar -- Defined at tcfail083.hs:3:43
+ instance Show Double -- Defined in `GHC.Float'
+ instance Show Float -- Defined in `GHC.Float'
+ ...plus 24 others
+ In the expression: print (f, b)
+ In an equation for `display':
+ display (State {bar = Bar {flag = f, baz = b}}) = print (f, b)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail099.stderr b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
index aa7eb99197..49132b002f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail099.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
@@ -8,6 +8,10 @@ tcfail099.hs:9:20:
at tcfail099.hs:9:7
`t' is a rigid type variable bound by
the inferred type of call :: DS -> t -> Int at tcfail099.hs:9:1
+ Relevant bindings include
+ call :: DS -> t -> Int (bound at tcfail099.hs:9:1)
+ f :: a -> Int (bound at tcfail099.hs:9:9)
+ arg :: t (bound at tcfail099.hs:9:12)
In the first argument of `f', namely `arg'
In the expression: f arg
In an equation for `call': call (C f) arg = f arg
diff --git a/testsuite/tests/typecheck/should_fail/tcfail102.stderr b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
index 4c651bf7d4..516734b05d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail102.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
@@ -8,7 +8,6 @@ tcfail102.hs:9:15:
bound by the type signature for
f :: Integral a => P (Ratio a) -> P (Ratio a)
at tcfail102.hs:8:6-45
- Possible fix: add an instance declaration for (Integral (Ratio a))
In the `p' field of a record
In the expression: x {p = p x}
In an equation for `f': f x = x {p = p x}
diff --git a/testsuite/tests/typecheck/should_fail/tcfail103.stderr b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
index 134f36f193..ea873e637f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail103.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
@@ -1,12 +1,16 @@
-
-tcfail103.hs:15:23:
- Couldn't match type `t' with `s'
- `t' is a rigid type variable bound by
- the type signature for f :: ST t Int at tcfail103.hs:10:5
- `s' is a rigid type variable bound by
- the type signature for g :: ST s Int at tcfail103.hs:13:14
- Expected type: STRef s Int
- Actual type: STRef t Int
- In the first argument of `readSTRef', namely `v'
- In the expression: readSTRef v
- In an equation for `g': g = readSTRef v
+
+tcfail103.hs:15:23:
+ Couldn't match type `t' with `s'
+ `t' is a rigid type variable bound by
+ the type signature for f :: ST t Int at tcfail103.hs:10:5
+ `s' is a rigid type variable bound by
+ the type signature for g :: ST s Int at tcfail103.hs:13:14
+ Expected type: STRef s Int
+ Actual type: STRef t Int
+ Relevant bindings include
+ f :: ST t Int (bound at tcfail103.hs:11:1)
+ v :: STRef t Int (bound at tcfail103.hs:12:5)
+ g :: ST s Int (bound at tcfail103.hs:15:9)
+ In the first argument of `readSTRef', namely `v'
+ In the expression: readSTRef v
+ In an equation for `g': g = readSTRef v
diff --git a/testsuite/tests/typecheck/should_fail/tcfail106.stderr b/testsuite/tests/typecheck/should_fail/tcfail106.stderr
index 09c09769ba..b08c7dfe89 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail106.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail106.stderr
@@ -2,5 +2,4 @@
tcfail106.hs:14:10:
No instance for (S Int)
arising from the superclasses of an instance declaration
- Possible fix: add an instance declaration for (S Int)
In the instance declaration for `D Int'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail109.stderr b/testsuite/tests/typecheck/should_fail/tcfail109.stderr
index a72c6238d9..5455815409 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail109.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail109.stderr
@@ -2,5 +2,4 @@
tcfail109.hs:16:10:
No instance for (Eq Stupid)
arising from the superclasses of an instance declaration
- Possible fix: add an instance declaration for (Eq Stupid)
In the instance declaration for `Collects Bool Stupid'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail128.stderr b/testsuite/tests/typecheck/should_fail/tcfail128.stderr
index 0834cc2fbd..265b783465 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail128.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail128.stderr
@@ -7,9 +7,6 @@ tcfail128.hs:18:16:
Note: there is a potential instance available:
instance Data.Array.Base.MArray GHC.IOArray.IOArray e IO
-- Defined in `Data.Array.Base'
- Possible fix:
- add an instance declaration for
- (Data.Array.Base.MArray b0 FlatVector IO)
In a stmt of a 'do' block: v <- thaw tmp
In the expression:
do { let sL = ...
diff --git a/testsuite/tests/typecheck/should_fail/tcfail131.stderr b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
index 785801a9a4..db2a954d57 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail131.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
@@ -1,11 +1,14 @@
-
-tcfail131.hs:7:9:
- Could not deduce (b ~ Integer)
- from the context (Num b)
- bound by the type signature for g :: Num b => b -> b
- at tcfail131.hs:6:8-22
- `b' is a rigid type variable bound by
- the type signature for g :: Num b => b -> b at tcfail131.hs:6:8
- In the return type of a call of `f'
- In the expression: f x x
- In an equation for `g': g x = f x x
+
+tcfail131.hs:7:9:
+ Could not deduce (b ~ Integer)
+ from the context (Num b)
+ bound by the type signature for g :: Num b => b -> b
+ at tcfail131.hs:6:8-22
+ `b' is a rigid type variable bound by
+ the type signature for g :: Num b => b -> b at tcfail131.hs:6:8
+ Relevant bindings include
+ g :: b -> b (bound at tcfail131.hs:7:3)
+ x :: b (bound at tcfail131.hs:7:5)
+ In the return type of a call of `f'
+ In the expression: f x x
+ In an equation for `g': g x = f x x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail133.stderr b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
index 08c9b9747d..48ea0ebae2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail133.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
@@ -20,9 +20,6 @@ tcfail133.hs:68:7:
tcfail133.hs:68:14:
No instance for (AddDigit (Zero :@ (One :@ One)) One a0)
arising from a use of `add'
- Possible fix:
- add an instance declaration for
- (AddDigit (Zero :@ (One :@ One)) One a0)
In the second argument of `($)', namely
`add (One :@ Zero) (One :@ One)'
In the expression: show $ add (One :@ Zero) (One :@ One)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail137.stderr b/testsuite/tests/typecheck/should_fail/tcfail137.stderr
index 9cbe69b98d..b84fff1dfa 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail137.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail137.stderr
@@ -1,10 +1,8 @@
-tcfail137.hs:1:14:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+tcfail137.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
tcfail137.hs:8:5:
- No instance for (Floating Bool)
- arising from a use of `Test'
- Possible fix: add an instance declaration for (Floating Bool)
+ No instance for (Floating Bool) arising from a use of `Test'
In the expression: Test [False, True]
In an equation for `x': x = Test [False, True]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail140.stderr b/testsuite/tests/typecheck/should_fail/tcfail140.stderr
index f24a2a7f82..0d9cd3404e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail140.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail140.stderr
@@ -1,20 +1,26 @@
tcfail140.hs:10:7:
- Couldn't match expected type `a0 -> t0' with actual type `Int'
+ Couldn't match expected type `Integer -> t' with actual type `Int'
+ Relevant bindings include bar :: t (bound at tcfail140.hs:10:1)
The function `f' is applied to two arguments,
but its type `Int -> Int' has only one
In the expression: f 3 9
In an equation for `bar': bar = f 3 9
tcfail140.hs:12:10:
- Couldn't match expected type `a0 -> t0' with actual type `Int'
+ Couldn't match expected type `Integer -> t1' with actual type `Int'
+ Relevant bindings include
+ rot :: t -> t1 (bound at tcfail140.hs:12:1)
The operator `f' takes two arguments,
but its type `Int -> Int' has only one
In the expression: 3 `f` 4
In an equation for `rot': rot xs = 3 `f` 4
tcfail140.hs:14:15:
- Couldn't match expected type `a0 -> b0' with actual type `Int'
+ Couldn't match expected type `a -> b' with actual type `Int'
+ Relevant bindings include
+ bot :: [a] -> [b] (bound at tcfail140.hs:14:1)
+ xs :: [a] (bound at tcfail140.hs:14:5)
The operator `f' takes two arguments,
but its type `Int -> Int' has only one
In the first argument of `map', namely `(3 `f`)'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail153.stderr b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
index 200df0b6f6..2647156f87 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail153.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
@@ -5,6 +5,9 @@ tcfail153.hs:6:7:
the type signature for f :: a -> [a] at tcfail153.hs:5:6
Expected type: [a]
Actual type: [Bool]
+ Relevant bindings include
+ f :: a -> [a] (bound at tcfail153.hs:6:1)
+ x :: a (bound at tcfail153.hs:6:3)
In the return type of a call of `g'
In the expression: g x
In an equation for `f':
diff --git a/testsuite/tests/typecheck/should_fail/tcfail169.stderr b/testsuite/tests/typecheck/should_fail/tcfail169.stderr
index cfe63c06ee..1e0262d414 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail169.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail169.stderr
@@ -3,7 +3,6 @@ tcfail169.hs:7:51:
No instance for (Show (Succ a))
arising from the 'deriving' clause of a data type declaration
Possible fix:
- add an instance declaration for (Show (Succ a))
- or use a standalone 'deriving instance' declaration,
- so you can specify the instance context yourself
+ use a standalone 'deriving instance' declaration,
+ so you can specify the instance context yourself
When deriving the instance for (Show (Seq a))
diff --git a/testsuite/tests/typecheck/should_fail/tcfail174.stderr b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
index c4fb525c5e..762a87efe0 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail174.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
@@ -1,31 +1,35 @@
-
-tcfail174.hs:9:10:
- Couldn't match expected type `forall a. a -> a'
- with actual type `a0 -> a0'
- In the first argument of `Base', namely `id'
- In the expression: Base id
- In an equation for `g': g = Base id
-
-tcfail174.hs:13:14:
- Couldn't match type `a' with `a1'
- `a' is a rigid type variable bound by
- the inferred type of h1 :: Capture a at tcfail174.hs:13:1
- `a1' is a rigid type variable bound by
- the type forall a1. a1 -> a1 at tcfail174.hs:13:14
- Expected type: Capture (forall x. x -> a)
- Actual type: Capture (forall a. a -> a)
- In the first argument of `Capture', namely `g'
- In the expression: Capture g
- In an equation for `h1': h1 = Capture g
-
-tcfail174.hs:16:14:
- Couldn't match type `a' with `b'
- `a' is a rigid type variable bound by
- the type forall a. a -> a at tcfail174.hs:16:14
- `b' is a rigid type variable bound by
- the type signature for h2 :: Capture b at tcfail174.hs:15:7
- Expected type: Capture (forall x. x -> b)
- Actual type: Capture (forall a. a -> a)
- In the first argument of `Capture', namely `g'
- In the expression: Capture g
- In an equation for `h2': h2 = Capture g
+
+tcfail174.hs:9:10:
+ Couldn't match expected type `forall a. a -> a'
+ with actual type `a0 -> a0'
+ In the first argument of `Base', namely `id'
+ In the expression: Base id
+ In an equation for `g': g = Base id
+
+tcfail174.hs:13:14:
+ Couldn't match type `a' with `a1'
+ because type variable `a1' would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type forall a. a -> a
+ at tcfail174.hs:13:14
+ Expected type: Capture (forall x. x -> a)
+ Actual type: Capture (forall a. a -> a)
+ Relevant bindings include
+ h1 :: Capture a (bound at tcfail174.hs:13:1)
+ In the first argument of `Capture', namely `g'
+ In the expression: Capture g
+ In an equation for `h1': h1 = Capture g
+
+tcfail174.hs:16:14:
+ Couldn't match type `a' with `b'
+ `a' is a rigid type variable bound by
+ the type forall a. a -> a at tcfail174.hs:16:14
+ `b' is a rigid type variable bound by
+ the type signature for h2 :: Capture b at tcfail174.hs:15:7
+ Expected type: Capture (forall x. x -> b)
+ Actual type: Capture (forall a. a -> a)
+ Relevant bindings include
+ h2 :: Capture b (bound at tcfail174.hs:16:1)
+ In the first argument of `Capture', namely `g'
+ In the expression: Capture g
+ In an equation for `h2': h2 = Capture g
diff --git a/testsuite/tests/typecheck/should_fail/tcfail175.stderr b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
index 797b701d6d..d467a15701 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail175.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
@@ -1,8 +1,10 @@
-
-tcfail175.hs:11:1:
- Couldn't match expected type `a'
- with actual type `String -> String -> String'
- `a' is a rigid type variable bound by
- the type signature for evalRHS :: Int -> a at tcfail175.hs:10:12
- The equation(s) for `evalRHS' have three arguments,
- but its type `Int -> a' has only one
+
+tcfail175.hs:11:1:
+ Couldn't match expected type `a'
+ with actual type `String -> String -> String'
+ `a' is a rigid type variable bound by
+ the type signature for evalRHS :: Int -> a at tcfail175.hs:10:12
+ Relevant bindings include
+ evalRHS :: Int -> a (bound at tcfail175.hs:11:1)
+ The equation(s) for `evalRHS' have three arguments,
+ but its type `Int -> a' has only one
diff --git a/testsuite/tests/typecheck/should_fail/tcfail178.stderr b/testsuite/tests/typecheck/should_fail/tcfail178.stderr
index 66773a2fea..b0b6360df7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail178.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail178.stderr
@@ -1,14 +1,16 @@
tcfail178.hs:15:7:
- Couldn't match type `()' with `[a0]'
- Expected type: Bool -> [a0]
+ Couldn't match type `()' with `[a]'
+ Expected type: Bool -> [a]
Actual type: Bool -> ()
+ Relevant bindings include c :: [a] (bound at tcfail178.hs:15:1)
In the first argument of `a', namely `y'
In the expression: a y
In an equation for `c': c = a y
tcfail178.hs:18:7:
- Couldn't match expected type `Bool -> [a0]' with actual type `()'
+ Couldn't match expected type `Bool -> [a]' with actual type `()'
+ Relevant bindings include d :: [a] (bound at tcfail178.hs:18:1)
In the first argument of `a', namely `()'
In the expression: a ()
In an equation for `d': d = a ()
diff --git a/testsuite/tests/typecheck/should_fail/tcfail179.stderr b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
index 4962c8aae7..c60c7ac2e7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail179.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
@@ -1,13 +1,18 @@
-
-tcfail179.hs:14:39:
- Couldn't match expected type `s' with actual type `x'
- `s' is a rigid type variable bound by
- the type signature for run :: T s -> Int at tcfail179.hs:12:8
- `x' is a rigid type variable bound by
- a pattern with constructor
- T :: forall s x. (s -> (x -> s) -> (x, s, Int)) -> T s,
- in a case alternative
- at tcfail179.hs:14:14
- In the first argument of `g', namely `x'
- In the expression: g x id
- In a pattern binding: (x, _, b) = g x id
+
+tcfail179.hs:14:39:
+ Couldn't match expected type `s' with actual type `x'
+ `s' is a rigid type variable bound by
+ the type signature for run :: T s -> Int at tcfail179.hs:12:8
+ `x' is a rigid type variable bound by
+ a pattern with constructor
+ T :: forall s x. (s -> (x -> s) -> (x, s, Int)) -> T s,
+ in a case alternative
+ at tcfail179.hs:14:14
+ Relevant bindings include
+ run :: T s -> Int (bound at tcfail179.hs:13:1)
+ ts :: T s (bound at tcfail179.hs:13:5)
+ g :: s -> (x -> s) -> (x, s, Int) (bound at tcfail179.hs:14:16)
+ x :: x (bound at tcfail179.hs:14:26)
+ In the first argument of `g', namely `x'
+ In the expression: g x id
+ In a pattern binding: (x, _, b) = g x id
diff --git a/testsuite/tests/typecheck/should_fail/tcfail182.stderr b/testsuite/tests/typecheck/should_fail/tcfail182.stderr
index d6b97af250..e021987234 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail182.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail182.stderr
@@ -2,5 +2,7 @@
tcfail182.hs:9:3:
Couldn't match expected type `Prelude.Maybe a'
with actual type `Maybe t0'
+ Relevant bindings include
+ f :: Prelude.Maybe a -> Int (bound at tcfail182.hs:9:1)
In the pattern: Foo
In an equation for `f': f Foo = 3
diff --git a/testsuite/tests/typecheck/should_fail/tcfail189.stderr b/testsuite/tests/typecheck/should_fail/tcfail189.stderr
index 6364cc2d5b..0e953563d4 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail189.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail189.stderr
@@ -1,7 +1,7 @@
tcfail189.hs:10:31:
- Couldn't match type `[a0]' with `a -> a1'
- Expected type: (a -> a1) -> [a] -> [[a]]
+ Couldn't match type `[a0]' with `a -> Integer'
+ Expected type: (a -> Integer) -> [a] -> [[a]]
Actual type: [a0] -> [a0]
In the return type of a call of `take'
Probable cause: `take' is applied to too many arguments
diff --git a/testsuite/tests/typecheck/should_fail/tcfail190.stderr b/testsuite/tests/typecheck/should_fail/tcfail190.stderr
index a6469e72d7..db2d842f58 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail190.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail190.stderr
@@ -1,8 +1,6 @@
tcfail190.hs:14:31:
- No instance for (Ord Unorderable)
- arising from a use of `groupWith'
- Possible fix: add an instance declaration for (Ord Unorderable)
+ No instance for (Ord Unorderable) arising from a use of `groupWith'
In the expression: groupWith
In a stmt of a list comprehension: then group by x using groupWith
In the expression:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail192.stderr b/testsuite/tests/typecheck/should_fail/tcfail192.stderr
index 349121975c..d4cc8bbbfc 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail192.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail192.stderr
@@ -1,8 +1,6 @@
tcfail192.hs:8:11:
- No instance for (Num [[Char]])
- arising from a use of `+'
- Possible fix: add an instance declaration for (Num [[Char]])
+ No instance for (Num [[Char]]) arising from a use of `+'
In the expression: x + 1
In the expression:
[x + 1 | x <- ["Hello", "World"], then group using take 5]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail194.stderr b/testsuite/tests/typecheck/should_fail/tcfail194.stderr
index 620fa75b52..7190a884ca 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail194.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail194.stderr
@@ -1,9 +1,10 @@
-
-tcfail194.hs:9:29:
- Couldn't match type `[a0]' with `a -> t0'
- Expected type: (a -> t0) -> [a] -> [a]
- Actual type: [a0] -> [a0]
- In the return type of a call of `take'
- Probable cause: `take' is applied to too many arguments
- In the expression: take 5
- In a stmt of a list comprehension: then take 5 by x
+
+tcfail194.hs:9:29:
+ Couldn't match type `[a0]' with `a -> t'
+ Expected type: (a -> t) -> [a] -> [a]
+ Actual type: [a0] -> [a0]
+ Relevant bindings include z :: [t] (bound at tcfail194.hs:9:1)
+ In the return type of a call of `take'
+ Probable cause: `take' is applied to too many arguments
+ In the expression: take 5
+ In a stmt of a list comprehension: then take 5 by x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail198.stderr b/testsuite/tests/typecheck/should_fail/tcfail198.stderr
index bba13900de..ab040a1e2d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail198.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail198.stderr
@@ -5,6 +5,10 @@ tcfail198.hs:6:36:
an expression type signature: a1 at tcfail198.hs:6:36
`a' is a rigid type variable bound by
the inferred type of f3 :: [a] -> [a] at tcfail198.hs:6:1
+ Relevant bindings include
+ f3 :: [a] -> [a] (bound at tcfail198.hs:6:6)
+ x :: a (bound at tcfail198.hs:6:19)
+ xs :: [a] (bound at tcfail198.hs:6:21)
In the expression: x :: a
In the second argument of `(++)', namely `[x :: a]'
In the expression: xs ++ [x :: a]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail201.stderr b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
index 6a60b9fc90..4d93f9fadd 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail201.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
@@ -6,6 +6,11 @@ tcfail201.hs:17:27:
gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
-> (forall g. g -> c g) -> a -> c a
at tcfail201.hs:15:12
+ Relevant bindings include
+ gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
+ -> (forall g. g -> c g) -> a -> c a
+ (bound at tcfail201.hs:16:1)
+ hsDoc :: a (bound at tcfail201.hs:16:13)
In the pattern: DocEmpty
In a case alternative: DocEmpty -> z DocEmpty
In the expression:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail206.stderr b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
index 3283089afc..2d0f87132f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail206.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
@@ -19,6 +19,8 @@ tcfail206.hs:11:5:
the type signature for c :: a -> (a, Bool) at tcfail206.hs:10:6
Expected type: a -> (a, Bool)
Actual type: a -> (a, a)
+ Relevant bindings include
+ c :: a -> (a, Bool) (bound at tcfail206.hs:11:1)
In the expression: (True || False,)
In an equation for `c': c = (True || False,)
@@ -43,5 +45,7 @@ tcfail206.hs:20:5:
the type signature for f :: a -> (# a, Bool #) at tcfail206.hs:19:6
Expected type: a -> (# a, Bool #)
Actual type: a -> (# a, a #)
+ Relevant bindings include
+ f :: a -> (# a, Bool #) (bound at tcfail206.hs:20:1)
In the expression: (# True || False, #)
In an equation for `f': f = (# True || False, #)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail208.stderr b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
index d606115ad1..d3172b6a91 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail208.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
@@ -5,6 +5,5 @@ tcfail208.hs:4:19:
bound by the type signature for
f :: (Monad m, Eq a) => a -> m a -> Bool
at tcfail208.hs:3:6-40
- Possible fix: add an instance declaration for (Eq (m a))
In the expression: (return x == y)
In an equation for `f': f x y = (return x == y)