summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail
diff options
context:
space:
mode:
authorEvan Laforge <qdunkan@gmail.com>2015-11-24 12:43:18 +0100
committerBen Gamari <ben@smart-cactus.org>2015-11-24 14:02:58 +0100
commitc05fdddec71f9dc8ebe62d751ccf03367128072a (patch)
tree4afadb128af4af0f99dfb92fdbb9607bbeb64f04 /testsuite/tests/typecheck/should_fail
parentf09f2470a76bb08b7f51d2f5663daa672b86f618 (diff)
downloadhaskell-c05fdddec71f9dc8ebe62d751ccf03367128072a.tar.gz
Rearrange error msgs and add section markers (Trac #11014).
This puts the "Relevant bindings" section at the end. It uses a TcErrors.Report Monoid to divide messages by importance and then mappends them together. This is not the most efficient way since there are various intermediate Reports and list appends, but it probably doesn't matter since error messages shouldn't get that large, and are usually prepended. In practice, everything is `important` except `relevantBindings`, which is `supplementary`. ErrMsg's errMsgShortDoc and errMsgExtraInfo were extracted into ErrDoc, which has important, context, and suppelementary fields. Each of those three sections is marked with a bullet character, '•' on unicode terminals and '*' on ascii terminals. Since this breaks tons of tests, I also modified testlib.normalise_errmsg to strip out '•'s. --- Additional notes: To avoid prepending * to an empty doc, I needed to filter empty docs. This seemed less error-prone than trying to modify everyone who produces SDoc to instead produce Maybe SDoc. So I added `Outputable.isEmpty`. Unfortunately it needs a DynFlags, which is kind of bogus, but otherwise I think I'd need another Empty case for SDoc, and then it couldn't be a newtype any more. ErrMsg's errMsgShortString is only used by the Show instance, which is in turn only used by Show HscTypes.SourceError, which is in turn only needed for the Exception instance. So it's probably possible to get rid of errMsgShortString, but that would a be an unrelated cleanup. Fixes #11014. Test Plan: see above Reviewers: austin, simonpj, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: simonpj, nomeata, thomie Differential Revision: https://phabricator.haskell.org/D1427 GHC Trac Issues: #11014
Diffstat (limited to 'testsuite/tests/typecheck/should_fail')
-rw-r--r--testsuite/tests/typecheck/should_fail/FDsFromGivens2.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/T10285.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T10495.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T10534.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T10715b.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T1899.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T2534.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T2688.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T2714.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/T3950.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T5689.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T5853.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T7264.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T7368a.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T7453.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/T7696.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T7734.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/T7748a.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/T7869.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/T8044.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T8142.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T8262.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T8428.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T8450.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T9109.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T9497d.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T9605.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T9612.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/mc22.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/mc23.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/mc24.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/mc25.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail001.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail002.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail004.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail005.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail013.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail014.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail016.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail032.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail033.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail065.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail068.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail076.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail099.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail103.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail122.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail131.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail140.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail153.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail174.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail175.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail178.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail179.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail182.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail198.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail200.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail201.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail206.stderr8
61 files changed, 148 insertions, 148 deletions
diff --git a/testsuite/tests/typecheck/should_fail/FDsFromGivens2.stderr b/testsuite/tests/typecheck/should_fail/FDsFromGivens2.stderr
index a738c7ffa4..a084b303dd 100644
--- a/testsuite/tests/typecheck/should_fail/FDsFromGivens2.stderr
+++ b/testsuite/tests/typecheck/should_fail/FDsFromGivens2.stderr
@@ -8,7 +8,7 @@ FDsFromGivens2.hs:14:15: error:
KCC :: C Char Char => () -> KCC,
in an equation for ‘bar’
at FDsFromGivens2.hs:14:6-10
- Relevant bindings include
- bar :: KCC -> a -> a (bound at FDsFromGivens2.hs:14:1)
In the expression: f
In an equation for ‘bar’: bar (KCC _) = f
+ Relevant bindings include
+ bar :: KCC -> a -> a (bound at FDsFromGivens2.hs:14:1)
diff --git a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
index 932ba108d4..b545a10caa 100644
--- a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
+++ b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
@@ -12,10 +12,10 @@ FrozenErrorTests.hs:26:9:
Occurs check: cannot construct the infinite type: a ~ [a]
Expected type: [a]
Actual type: F a Bool
- Relevant bindings include
- test1 :: a (bound at FrozenErrorTests.hs:26:1)
In the expression: goo1 False undefined
In an equation for ‘test1’: test1 = goo1 False undefined
+ Relevant bindings include
+ test1 :: a (bound at FrozenErrorTests.hs:26:1)
FrozenErrorTests.hs:29:15:
Couldn't match type ‘Int’ with ‘[Int]’
@@ -36,17 +36,17 @@ FrozenErrorTests.hs:45:15:
Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
Actual type: F (T2 (T2 c c) c) Bool
- Relevant bindings include
- test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1)
In the first argument of ‘goo4’, namely ‘(goo3 False undefined)’
In the expression: goo4 (goo3 False undefined)
In an equation for ‘test4’: test4 = goo4 (goo3 False undefined)
+ Relevant bindings include
+ test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1)
FrozenErrorTests.hs:46:9:
Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
Actual type: F (T2 (T2 c c) c) Bool
- Relevant bindings include
- test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1)
In the expression: goo3 False (goo4 undefined)
In an equation for ‘test5’: test5 = goo3 False (goo4 undefined)
+ Relevant bindings include
+ test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1)
diff --git a/testsuite/tests/typecheck/should_fail/T10285.stderr b/testsuite/tests/typecheck/should_fail/T10285.stderr
index 8a13daeae2..d14bc3b427 100644
--- a/testsuite/tests/typecheck/should_fail/T10285.stderr
+++ b/testsuite/tests/typecheck/should_fail/T10285.stderr
@@ -14,7 +14,7 @@ T10285.hs:8:17: error:
‘b’ is a rigid type variable bound by
the type signature for: oops :: Coercion (N a) (N b) -> a -> b
at T10285.hs:7:9
- Relevant bindings include
- oops :: Coercion (N a) (N b) -> a -> b (bound at T10285.hs:8:1)
In the expression: coerce
In an equation for ‘oops’: oops Coercion = coerce
+ Relevant bindings include
+ oops :: Coercion (N a) (N b) -> a -> b (bound at T10285.hs:8:1)
diff --git a/testsuite/tests/typecheck/should_fail/T10495.stderr b/testsuite/tests/typecheck/should_fail/T10495.stderr
index eec1cdb7c0..ee2060017e 100644
--- a/testsuite/tests/typecheck/should_fail/T10495.stderr
+++ b/testsuite/tests/typecheck/should_fail/T10495.stderr
@@ -2,6 +2,6 @@
T10495.hs:5:7: error:
Couldn't match representation of type ‘a0’ with that of ‘b0’
arising from a use of ‘coerce’
- Relevant bindings include foo :: a0 -> b0 (bound at T10495.hs:5:1)
In the expression: coerce
In an equation for ‘foo’: foo = coerce
+ Relevant bindings include foo :: a0 -> b0 (bound at T10495.hs:5:1)
diff --git a/testsuite/tests/typecheck/should_fail/T10534.stderr b/testsuite/tests/typecheck/should_fail/T10534.stderr
index 5bb0e40097..41deac7063 100644
--- a/testsuite/tests/typecheck/should_fail/T10534.stderr
+++ b/testsuite/tests/typecheck/should_fail/T10534.stderr
@@ -11,7 +11,7 @@ T10534a.hs:10:9: error:
‘b’ is a rigid type variable bound by
the type signature for: silly :: Coercible (DF a) (DF b) => a -> b
at T10534a.hs:9:10
- Relevant bindings include
- silly :: a -> b (bound at T10534a.hs:10:1)
In the expression: coerce
In an equation for ‘silly’: silly = coerce
+ Relevant bindings include
+ silly :: a -> b (bound at T10534a.hs:10:1)
diff --git a/testsuite/tests/typecheck/should_fail/T10715b.stderr b/testsuite/tests/typecheck/should_fail/T10715b.stderr
index 47c85bb145..8c7f370273 100644
--- a/testsuite/tests/typecheck/should_fail/T10715b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T10715b.stderr
@@ -2,7 +2,7 @@
T10715b.hs:7:7: error:
Occurs check: cannot construct the infinite type: b ~ [b]
arising from a use of ‘coerce’
- Relevant bindings include foo :: [b] -> b (bound at T10715b.hs:7:1)
In the first argument of ‘asTypeOf’, namely ‘coerce’
In the expression: coerce `asTypeOf` head
In an equation for ‘foo’: foo = coerce `asTypeOf` head
+ Relevant bindings include foo :: [b] -> b (bound at T10715b.hs:7:1)
diff --git a/testsuite/tests/typecheck/should_fail/T1899.stderr b/testsuite/tests/typecheck/should_fail/T1899.stderr
index 1702afcafc..d41c96a787 100644
--- a/testsuite/tests/typecheck/should_fail/T1899.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1899.stderr
@@ -6,8 +6,8 @@ T1899.hs:14:36: error:
at T1899.hs:9:14
Expected type: [Proposition a0]
Actual type: [a]
+ In the first argument of ‘Auxiliary’, namely ‘varSet’
+ In the first argument of ‘Prop’, namely ‘(Auxiliary varSet)’
Relevant bindings include
varSet :: [a] (bound at T1899.hs:10:11)
transRHS :: [a] -> Int -> Constraint a (bound at T1899.hs:10:2)
- In the first argument of ‘Auxiliary’, namely ‘varSet’
- In the first argument of ‘Prop’, namely ‘(Auxiliary varSet)’
diff --git a/testsuite/tests/typecheck/should_fail/T2534.stderr b/testsuite/tests/typecheck/should_fail/T2534.stderr
index 157521f953..fe6abae7b8 100644
--- a/testsuite/tests/typecheck/should_fail/T2534.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2534.stderr
@@ -3,6 +3,6 @@ T2534.hs:3:13:
Couldn't match type ‘[b]’ with ‘a0 -> [b]’
Expected type: [a0] -> [b] -> [b]
Actual type: [a0] -> (a0 -> [b]) -> [b]
- Relevant bindings include foo :: [b] (bound at T2534.hs:3:1)
In the first argument of ‘foldr’, namely ‘(>>=)’
In the expression: foldr (>>=) [] []
+ Relevant bindings include foo :: [b] (bound at T2534.hs:3:1)
diff --git a/testsuite/tests/typecheck/should_fail/T2688.stderr b/testsuite/tests/typecheck/should_fail/T2688.stderr
index 4b28d7da31..1915c41812 100644
--- a/testsuite/tests/typecheck/should_fail/T2688.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2688.stderr
@@ -5,9 +5,9 @@ T2688.hs:8:22:
the class declaration for ‘VectorSpace’ at T2688.hs:5:21
‘v’ is a rigid type variable bound by
the class declaration for ‘VectorSpace’ at T2688.hs:5:19
+ In the second argument of ‘(/)’, namely ‘s’
+ In the second argument of ‘(*^)’, namely ‘(1 / s)’
Relevant bindings include
s :: s (bound at T2688.hs:8:10)
v :: v (bound at T2688.hs:8:5)
(^/) :: v -> s -> v (bound at T2688.hs:8:5)
- In the second argument of ‘(/)’, namely ‘s’
- In the second argument of ‘(*^)’, namely ‘(1 / s)’
diff --git a/testsuite/tests/typecheck/should_fail/T2714.stderr b/testsuite/tests/typecheck/should_fail/T2714.stderr
index 65aa78cd90..07a925cc10 100644
--- a/testsuite/tests/typecheck/should_fail/T2714.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2714.stderr
@@ -6,10 +6,10 @@ 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
+ Relevant bindings include
+ f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
T2714.hs:8:5:
Couldn't match type ‘c’ with ‘f0 (a -> b)’
@@ -18,7 +18,7 @@ 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
+ Relevant bindings include
+ f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
diff --git a/testsuite/tests/typecheck/should_fail/T3950.stderr b/testsuite/tests/typecheck/should_fail/T3950.stderr
index 7b4837c8b9..1771e2f5e4 100644
--- a/testsuite/tests/typecheck/should_fail/T3950.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3950.stderr
@@ -6,7 +6,7 @@ T3950.hs:15:13:
Sealed :: (* -> *) -> *
Expected type: w (Id p)
Actual type: Sealed (Id p0 x0)
- Relevant bindings include
- rp :: Bool -> Maybe (w (Id p)) (bound at T3950.hs:15:1)
In the first argument of ‘Just’, namely ‘rp'’
In the expression: Just rp'
+ Relevant bindings include
+ rp :: Bool -> Maybe (w (Id p)) (bound at T3950.hs:15:1)
diff --git a/testsuite/tests/typecheck/should_fail/T5689.stderr b/testsuite/tests/typecheck/should_fail/T5689.stderr
index f8294f4705..6e3777d2ee 100644
--- a/testsuite/tests/typecheck/should_fail/T5689.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5689.stderr
@@ -1,8 +1,8 @@
T5689.hs:10:36: error:
Couldn't match expected type ‘Bool’ with actual type ‘t’
+ In the expression: v
+ In the expression: if v then False else True
Relevant bindings include
v :: t (bound at T5689.hs:10:28)
r :: IORef (t -> t) (bound at T5689.hs:7:14)
- In the expression: v
- In the expression: if v then False else True
diff --git a/testsuite/tests/typecheck/should_fail/T5853.stderr b/testsuite/tests/typecheck/should_fail/T5853.stderr
index 2d5c90284b..231d57dcdd 100644
--- a/testsuite/tests/typecheck/should_fail/T5853.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5853.stderr
@@ -10,9 +10,9 @@ T5853.hs:15:52: error:
bound by the RULE "map/map" at T5853.hs:15:2-57
‘t2’ is a rigid type variable bound by
the RULE "map/map" at T5853.hs:15:2
+ In the expression: (f . g) <$> xs
+ When checking the transformation rule "map/map"
Relevant bindings include
f :: Elem t -> Elem t2 (bound at T5853.hs:15:19)
g :: Elem t1 -> Elem t (bound at T5853.hs:15:21)
xs :: t1 (bound at T5853.hs:15:23)
- In the expression: (f . g) <$> xs
- When checking the transformation rule "map/map"
diff --git a/testsuite/tests/typecheck/should_fail/T7264.stderr b/testsuite/tests/typecheck/should_fail/T7264.stderr
index b2696d41bb..4b5b3557d9 100644
--- a/testsuite/tests/typecheck/should_fail/T7264.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7264.stderr
@@ -5,8 +5,8 @@ T7264.hs:13:19:
the inferred type of mkFoo2 :: a -> Maybe Foo at T7264.hs:13:1
Expected type: a -> Foo
Actual type: (forall r. r -> String) -> Foo
+ In the first argument of ‘mmap’, namely ‘Foo’
+ In the expression: mmap Foo (Just val)
Relevant bindings include
val :: a (bound at T7264.hs:13:8)
mkFoo2 :: a -> Maybe Foo (bound at T7264.hs:13:1)
- In the first argument of ‘mmap’, namely ‘Foo’
- In the expression: mmap Foo (Just val)
diff --git a/testsuite/tests/typecheck/should_fail/T7368a.stderr b/testsuite/tests/typecheck/should_fail/T7368a.stderr
index 7ee59e129e..a4f796ce6f 100644
--- a/testsuite/tests/typecheck/should_fail/T7368a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7368a.stderr
@@ -6,7 +6,7 @@ T7368a.hs:8:6: error:
Bad :: (* -> *) -> *
Expected type: f (Bad f)
Actual type: Bad t0
- Relevant bindings include
- fun :: f (Bad f) -> Bool (bound at T7368a.hs:8:1)
In the pattern: Bad x
In an equation for ‘fun’: fun (Bad x) = True
+ Relevant bindings include
+ fun :: f (Bad f) -> Bool (bound at T7368a.hs:8:1)
diff --git a/testsuite/tests/typecheck/should_fail/T7453.stderr b/testsuite/tests/typecheck/should_fail/T7453.stderr
index 0a0f73d47e..4ca1218772 100644
--- a/testsuite/tests/typecheck/should_fail/T7453.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7453.stderr
@@ -5,13 +5,13 @@ T7453.hs:10:30: error:
This (rigid, skolem) type variable is bound by
the type signature for: z :: Id t1
at T7453.hs:8:16-19
+ In the first argument of ‘Id’, namely ‘v’
+ In the expression: Id v
Relevant bindings include
aux :: Id t1 (bound at T7453.hs:10:21)
z :: Id t1 (bound at T7453.hs:9:11)
v :: t (bound at T7453.hs:7:7)
cast1 :: t -> a (bound at T7453.hs:7:1)
- In the first argument of ‘Id’, namely ‘v’
- In the expression: Id v
T7453.hs:16:33: error:
Couldn't match expected type ‘t2’ with actual type ‘t’
@@ -19,13 +19,13 @@ T7453.hs:16:33: error:
This (rigid, skolem) type variable is bound by
the type signature for: z :: () -> t2
at T7453.hs:14:16-22
+ In the first argument of ‘const’, namely ‘v’
+ In the expression: const v
Relevant bindings include
aux :: b -> t2 (bound at T7453.hs:16:21)
z :: () -> t2 (bound at T7453.hs:15:11)
v :: t (bound at T7453.hs:13:7)
cast2 :: t -> t1 (bound at T7453.hs:13:1)
- In the first argument of ‘const’, namely ‘v’
- In the expression: const v
T7453.hs:21:15: error:
Couldn't match expected type ‘t2’ with actual type ‘t’
@@ -33,13 +33,13 @@ T7453.hs:21:15: error:
This (rigid, skolem) type variable is bound by
the type signature for: z :: t2
at T7453.hs:20:16
- Relevant bindings include
- aux :: forall b. b -> t2 (bound at T7453.hs:22:21)
- z :: t2 (bound at T7453.hs:21:11)
- v :: t (bound at T7453.hs:19:7)
- cast3 :: t -> t1 (bound at T7453.hs:19:1)
In the expression: v
In an equation for ‘z’:
z = v
where
aux = const v
+ Relevant bindings include
+ aux :: forall b. b -> t2 (bound at T7453.hs:22:21)
+ z :: t2 (bound at T7453.hs:21:11)
+ v :: t (bound at T7453.hs:19:7)
+ cast3 :: t -> t1 (bound at T7453.hs:19:1)
diff --git a/testsuite/tests/typecheck/should_fail/T7696.stderr b/testsuite/tests/typecheck/should_fail/T7696.stderr
index 1fc2e43755..73da26c4f4 100644
--- a/testsuite/tests/typecheck/should_fail/T7696.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7696.stderr
@@ -6,6 +6,6 @@ T7696.hs:7:6: error:
w :: * -> *
Expected type: ((), w ())
Actual type: (m0 a0, t0 m0)
- Relevant bindings include f2 :: ((), w ()) (bound at T7696.hs:7:1)
In the expression: f1
In an equation for ‘f2’: f2 = f1
+ Relevant bindings include f2 :: ((), w ()) (bound at T7696.hs:7:1)
diff --git a/testsuite/tests/typecheck/should_fail/T7734.stderr b/testsuite/tests/typecheck/should_fail/T7734.stderr
index 3f59340441..9cd71add8d 100644
--- a/testsuite/tests/typecheck/should_fail/T7734.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7734.stderr
@@ -1,16 +1,16 @@
T7734.hs:4:13:
Occurs check: cannot construct the infinite type: t2 ~ t2 -> t1
+ In the first argument of ‘x’, namely ‘x’
+ In the expression: x x
Relevant bindings include
x :: t2 -> t1 (bound at T7734.hs:4:1)
f :: (t2 -> t1) -> t -> t1 (bound at T7734.hs:4:1)
- In the first argument of ‘x’, namely ‘x’
- In the expression: x x
T7734.hs:5:13:
Occurs check: cannot construct the infinite type: t2 ~ t2 -> t1
+ In the first argument of ‘x’, namely ‘x’
+ In the expression: x x
Relevant bindings include
x :: t2 -> t1 (bound at T7734.hs:5:5)
(&) :: (t2 -> t1) -> t -> t1 (bound at T7734.hs:5:1)
- In the first argument of ‘x’, namely ‘x’
- In the expression: x x
diff --git a/testsuite/tests/typecheck/should_fail/T7748a.stderr b/testsuite/tests/typecheck/should_fail/T7748a.stderr
index a8e2921a92..5e546b171a 100644
--- a/testsuite/tests/typecheck/should_fail/T7748a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7748a.stderr
@@ -4,11 +4,6 @@ T7748a.hs:16:24:
with actual type ‘Maybe (Maybe (r -> ()))’
‘a’ is a rigid type variable bound by
the type signature for: test :: a -> r -> () at T7748a.hs:11:9
- Relevant bindings include
- g :: r -> () (bound at T7748a.hs:13:16)
- f :: r -> () (bound at T7748a.hs:13:8)
- zd :: a (bound at T7748a.hs:12:6)
- test :: a -> r -> () (bound at T7748a.hs:12:1)
In the pattern: Just (Just p)
In a case alternative: Just (Just p) -> p
In the expression:
@@ -16,3 +11,8 @@ T7748a.hs:16:24:
Nothing -> const ()
Just Nothing -> const ()
Just (Just p) -> p }
+ Relevant bindings include
+ g :: r -> () (bound at T7748a.hs:13:16)
+ f :: r -> () (bound at T7748a.hs:13:8)
+ zd :: a (bound at T7748a.hs:12:6)
+ test :: a -> r -> () (bound at T7748a.hs:12:1)
diff --git a/testsuite/tests/typecheck/should_fail/T7869.stderr b/testsuite/tests/typecheck/should_fail/T7869.stderr
index dd3aabc464..74a483602d 100644
--- a/testsuite/tests/typecheck/should_fail/T7869.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7869.stderr
@@ -7,12 +7,12 @@ T7869.hs:3:12:
at T7869.hs:3:5-27
Expected type: [a1] -> b1
Actual type: [a] -> b
- Relevant bindings include
- x :: [a1] (bound at T7869.hs:3:7)
- f :: [a] -> b (bound at T7869.hs:3:1)
In the expression: f x
In the expression: (\ x -> f x) :: [a] -> b
In an equation for ‘f’: f = (\ x -> f x) :: [a] -> b
+ Relevant bindings include
+ x :: [a1] (bound at T7869.hs:3:7)
+ f :: [a] -> b (bound at T7869.hs:3:1)
T7869.hs:3:12:
Couldn't match type ‘b’ with ‘b1’
@@ -22,7 +22,7 @@ T7869.hs:3:12:
at T7869.hs:3:5-27
Expected type: [a1] -> b1
Actual type: [a] -> b
- Relevant bindings include f :: [a] -> b (bound at T7869.hs:3:1)
In the expression: f x
In the expression: (\ x -> f x) :: [a] -> b
In an equation for ‘f’: f = (\ x -> f x) :: [a] -> b
+ Relevant bindings include f :: [a] -> b (bound at T7869.hs:3:1)
diff --git a/testsuite/tests/typecheck/should_fail/T8044.stderr b/testsuite/tests/typecheck/should_fail/T8044.stderr
index 6178ea3d47..78ef035af8 100644
--- a/testsuite/tests/typecheck/should_fail/T8044.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8044.stderr
@@ -3,7 +3,7 @@ T8044.hs:16:13:
Couldn't match type ‘Frob a’ with ‘Char’
Expected type: X (Frob a)
Actual type: X Char
- Relevant bindings include
- frob :: X a -> X (Frob a) (bound at T8044.hs:15:1)
In the expression: XChar
In an equation for ‘frob’: frob _ = XChar
+ Relevant bindings include
+ frob :: X a -> X (Frob a) (bound at T8044.hs:15:1)
diff --git a/testsuite/tests/typecheck/should_fail/T8142.stderr b/testsuite/tests/typecheck/should_fail/T8142.stderr
index 43a3a46be0..93b2bf4914 100644
--- a/testsuite/tests/typecheck/should_fail/T8142.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8142.stderr
@@ -18,7 +18,7 @@ T8142.hs:6:57: error:
Couldn't match type ‘Nu ((,) t)’ with ‘g (Nu ((,) t))’
Expected type: Nu ((,) t) -> (t, g (Nu ((,) t)))
Actual type: Nu ((,) t) -> (t, Nu ((,) t))
- Relevant bindings include
- h :: Nu ((,) t) -> Nu g (bound at T8142.hs:6:18)
In the second argument of ‘(.)’, namely ‘out’
In the expression: (\ (_, b) -> ((outI . fmap h) b)) . out
+ Relevant bindings include
+ h :: Nu ((,) t) -> Nu g (bound at T8142.hs:6:18)
diff --git a/testsuite/tests/typecheck/should_fail/T8262.stderr b/testsuite/tests/typecheck/should_fail/T8262.stderr
index 5d77a6cb4a..b6f7ef7711 100644
--- a/testsuite/tests/typecheck/should_fail/T8262.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8262.stderr
@@ -4,8 +4,8 @@ T8262.hs:5:15: error:
When matching types
a :: *
Int# :: #
- Relevant bindings include
- foo :: t -> Maybe a (bound at T8262.hs:5:1)
In the first argument of ‘Just’, namely ‘(1#)’
In the expression: Just (1#)
In an equation for ‘foo’: foo x = Just (1#)
+ Relevant bindings include
+ foo :: t -> Maybe a (bound at T8262.hs:5:1)
diff --git a/testsuite/tests/typecheck/should_fail/T8428.stderr b/testsuite/tests/typecheck/should_fail/T8428.stderr
index 49c20a5b8f..cb4724331c 100644
--- a/testsuite/tests/typecheck/should_fail/T8428.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8428.stderr
@@ -3,8 +3,8 @@ T8428.hs:11:19:
Couldn't match type ‘(forall s. ST s) a’ with ‘forall s. ST s a’
Expected type: IdentityT (forall s. ST s) a -> forall s. ST s a
Actual type: IdentityT (forall s. ST s) a -> (forall s. ST s) a
+ In the second argument of ‘(.)’, namely ‘runIdentityT’
+ In the expression: runST . runIdentityT
Relevant bindings include
runIdST :: IdentityT (forall s. ST s) a -> a
(bound at T8428.hs:11:1)
- In the second argument of ‘(.)’, namely ‘runIdentityT’
- In the expression: runST . runIdentityT
diff --git a/testsuite/tests/typecheck/should_fail/T8450.stderr b/testsuite/tests/typecheck/should_fail/T8450.stderr
index 1416f2aec2..9cc70fa0df 100644
--- a/testsuite/tests/typecheck/should_fail/T8450.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8450.stderr
@@ -3,7 +3,7 @@ T8450.hs:8:7:
Couldn't match expected type ‘a’ with actual type ‘()’
‘a’ is a rigid type variable bound by
the type signature for: run :: a at T8450.hs:7:15
- Relevant bindings include run :: a (bound at T8450.hs:8:1)
In the expression: runEffect $ (undefined :: Either a ())
In an equation for ‘run’:
run = runEffect $ (undefined :: Either a ())
+ Relevant bindings include run :: a (bound at T8450.hs:8:1)
diff --git a/testsuite/tests/typecheck/should_fail/T9109.stderr b/testsuite/tests/typecheck/should_fail/T9109.stderr
index 1c7e6e5c09..afd77c4f81 100644
--- a/testsuite/tests/typecheck/should_fail/T9109.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9109.stderr
@@ -9,6 +9,6 @@ T9109.hs:8:13:
‘t’ is a rigid type variable bound by
the inferred type of foo :: G t1 -> t at T9109.hs:8:1
Possible fix: add a type signature for ‘foo’
- Relevant bindings include foo :: G t1 -> t (bound at T9109.hs:8:1)
In the expression: True
In an equation for ‘foo’: foo GBool = True
+ Relevant bindings include foo :: G t1 -> t (bound at T9109.hs:8:1)
diff --git a/testsuite/tests/typecheck/should_fail/T9497d.stderr b/testsuite/tests/typecheck/should_fail/T9497d.stderr
index 7838120ad6..1e99f97ea1 100644
--- a/testsuite/tests/typecheck/should_fail/T9497d.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9497d.stderr
@@ -2,6 +2,6 @@
T9497d.hs:2:8: error:
Found hole: _main :: IO ()
Or perhaps ‘_main’ is mis-spelled, or not in scope
- Relevant bindings include main :: IO () (bound at T9497d.hs:2:1)
In the expression: _main
In an equation for ‘main’: main = _main
+ Relevant bindings include main :: IO () (bound at T9497d.hs:2:1)
diff --git a/testsuite/tests/typecheck/should_fail/T9605.stderr b/testsuite/tests/typecheck/should_fail/T9605.stderr
index 4ba1d33382..479899c20f 100644
--- a/testsuite/tests/typecheck/should_fail/T9605.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9605.stderr
@@ -3,9 +3,9 @@ T9605.hs:7:6:
Couldn't match type ‘Bool’ with ‘m Bool’
Expected type: t0 -> m Bool
Actual type: t0 -> Bool
- Relevant bindings include f2 :: m Bool (bound at T9605.hs:7:1)
The function ‘f1’ is applied to one argument,
its type is ‘m0 Bool’,
it is specialized to ‘t0 -> Bool’
In the expression: f1 undefined
In an equation for ‘f2’: f2 = f1 undefined
+ Relevant bindings include f2 :: m Bool (bound at T9605.hs:7:1)
diff --git a/testsuite/tests/typecheck/should_fail/T9612.stderr b/testsuite/tests/typecheck/should_fail/T9612.stderr
index bffceb0baa..b5e6023664 100644
--- a/testsuite/tests/typecheck/should_fail/T9612.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9612.stderr
@@ -5,11 +5,6 @@ T9612.hs:16:9: error:
constraint ‘MonadWriter (Int, a) (WriterT [(Int, a)] Identity)’
arising from a use of ‘tell’
instance ‘MonadWriter w (WriterT w m)’ at T9612.hs:20:10-59
- Relevant bindings include
- x :: a (bound at T9612.hs:14:8)
- y :: a (bound at T9612.hs:14:3)
- f :: a -> (Int, a) -> Writer [(Int, a)] (Int, a)
- (bound at T9612.hs:14:1)
In a stmt of a 'do' block: tell (n, x)
In the expression:
do { tell (n, x);
@@ -18,3 +13,8 @@ T9612.hs:16:9: error:
f y (n, x)
= do { tell (n, x);
return (1, y) }
+ Relevant bindings include
+ x :: a (bound at T9612.hs:14:8)
+ y :: a (bound at T9612.hs:14:3)
+ f :: a -> (Int, a) -> Writer [(Int, a)] (Int, a)
+ (bound at T9612.hs:14:1)
diff --git a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
index e41d8c1b10..c97acc25a7 100644
--- a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
+++ b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
@@ -11,11 +11,11 @@ TcCoercibleFail.hs:14:8: error:
arising from a use of ‘coerce’
NB: We cannot know what roles the parameters to ‘m’ have;
we must assume that the role is nominal
- Relevant bindings include
- foo2 :: m Age (bound at TcCoercibleFail.hs:14:1)
In the expression: coerce
In the expression: coerce $ (return one :: m Int)
In an equation for ‘foo2’: foo2 = coerce $ (return one :: m Int)
+ Relevant bindings include
+ foo2 :: m Age (bound at TcCoercibleFail.hs:14:1)
TcCoercibleFail.hs:16:8: error:
Couldn't match type ‘Int’ with ‘Age’ arising from a use of ‘coerce’
diff --git a/testsuite/tests/typecheck/should_fail/mc22.stderr b/testsuite/tests/typecheck/should_fail/mc22.stderr
index 9501f93b97..aab0c1bdc3 100644
--- a/testsuite/tests/typecheck/should_fail/mc22.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc22.stderr
@@ -16,6 +16,6 @@ mc22.hs:10:26:
a type expected by the context: [a] -> [t a] at mc22.hs:9:9
Expected type: [a] -> [t a]
Actual type: [t a] -> [t a]
- Relevant bindings include foo :: [t [Char]] (bound at mc22.hs:8:1)
In the expression: take 5
In a stmt of a monad comprehension: then group using take 5
+ Relevant bindings include foo :: [t [Char]] (bound at mc22.hs:8:1)
diff --git a/testsuite/tests/typecheck/should_fail/mc23.stderr b/testsuite/tests/typecheck/should_fail/mc23.stderr
index 9f4a467a9d..945d1a6db8 100644
--- a/testsuite/tests/typecheck/should_fail/mc23.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc23.stderr
@@ -3,7 +3,7 @@ mc23.hs:9:29:
Couldn't match type ‘[a0]’ with ‘[a] -> m a’
Expected type: (a -> b) -> [a] -> m a
Actual type: [a0] -> [a0]
- Relevant bindings include z :: m b (bound at mc23.hs:9:1)
Possible 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
+ Relevant bindings include z :: m b (bound at mc23.hs:9:1)
diff --git a/testsuite/tests/typecheck/should_fail/mc24.stderr b/testsuite/tests/typecheck/should_fail/mc24.stderr
index 3260edbcb7..b14fd81162 100644
--- a/testsuite/tests/typecheck/should_fail/mc24.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc24.stderr
@@ -3,7 +3,7 @@ mc24.hs:10:31:
Couldn't match type ‘[a0]’ with ‘[a] -> m [a]’
Expected type: (a -> Integer) -> [a] -> m [a]
Actual type: [a0] -> [a0]
- Relevant bindings include foo :: m Int (bound at mc24.hs:8:1)
Possible 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
+ Relevant bindings include foo :: m Int (bound at mc24.hs:8:1)
diff --git a/testsuite/tests/typecheck/should_fail/mc25.stderr b/testsuite/tests/typecheck/should_fail/mc25.stderr
index ec88439e89..0989dbcf70 100644
--- a/testsuite/tests/typecheck/should_fail/mc25.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc25.stderr
@@ -13,6 +13,6 @@ mc25.hs:9:46: error:
Couldn't match type ‘a -> t’ with ‘Int’
Expected type: (a -> t) -> [a] -> [t1 a]
Actual type: Int -> [t1 a] -> [t1 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
+ Relevant bindings include z :: [t1 t] (bound at mc25.hs:9:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail001.stderr b/testsuite/tests/typecheck/should_fail/tcfail001.stderr
index 3c67882546..b30d995455 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail001.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail001.stderr
@@ -1,7 +1,7 @@
tcfail001.hs:9:2:
Couldn't match expected type ‘[t0] -> [t1]’ 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]’
+ Relevant bindings include op :: [a] (bound at tcfail001.hs:9:2)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail002.stderr b/testsuite/tests/typecheck/should_fail/tcfail002.stderr
index 11e8078a1b..4017239930 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail002.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail002.stderr
@@ -1,8 +1,8 @@
tcfail002.hs:4:7:
Occurs check: cannot construct the infinite type: t ~ [t]
+ In the expression: z
+ In an equation for ‘c’: c z = z
Relevant bindings include
z :: [t] (bound at tcfail002.hs:4:3)
c :: [t] -> t (bound at tcfail002.hs:3:1)
- In the expression: z
- In an equation for ‘c’: c z = z
diff --git a/testsuite/tests/typecheck/should_fail/tcfail004.stderr b/testsuite/tests/typecheck/should_fail/tcfail004.stderr
index 48840e7298..9c51edc5b2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail004.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail004.stderr
@@ -2,8 +2,8 @@
tcfail004.hs:3:9:
Couldn't match expected type ‘(t, t1)’
with actual type ‘(Integer, Integer, Integer)’
+ In the expression: (1, 2, 3)
+ In a pattern binding: (f, g) = (1, 2, 3)
Relevant bindings include
f :: t (bound at tcfail004.hs:3:2)
g :: t1 (bound at tcfail004.hs:3:4)
- 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 36f0e738e4..c9d3360243 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail005.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail005.stderr
@@ -2,8 +2,8 @@
tcfail005.hs:3:9:
Couldn't match expected type ‘[t]’
with actual type ‘(Integer, Char)’
+ In the expression: (1, 'a')
+ In a pattern binding: (h : i) = (1, 'a')
Relevant bindings include
h :: t (bound at tcfail005.hs:3:2)
i :: [t] (bound at tcfail005.hs:3:4)
- In the expression: (1, 'a')
- In a pattern binding: (h : i) = (1, 'a')
diff --git a/testsuite/tests/typecheck/should_fail/tcfail013.stderr b/testsuite/tests/typecheck/should_fail/tcfail013.stderr
index bf567acc2b..2f200abcce 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail013.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail013.stderr
@@ -1,6 +1,6 @@
tcfail013.hs:4:3:
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
+ Relevant bindings include f :: [t] -> a (bound at tcfail013.hs:3:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail014.stderr b/testsuite/tests/typecheck/should_fail/tcfail014.stderr
index d133863e34..bf28aa76b7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail014.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail014.stderr
@@ -1,8 +1,8 @@
tcfail014.hs:5:33:
Occurs check: cannot construct the infinite type: t8 ~ t8 -> t7
+ In the first argument of ‘z’, namely ‘z’
+ In the expression: z z
Relevant bindings include
z :: t8 -> t7 (bound at tcfail014.hs:5:27)
h :: (t8 -> t7) -> t7 (bound at tcfail014.hs:5:25)
- In the first argument of ‘z’, namely ‘z’
- In the expression: z z
diff --git a/testsuite/tests/typecheck/should_fail/tcfail016.stderr b/testsuite/tests/typecheck/should_fail/tcfail016.stderr
index 4180007122..59c8fa4e3d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail016.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail016.stderr
@@ -3,20 +3,20 @@ tcfail016.hs:9:20:
Couldn't match type ‘(t, Expr t)’ with ‘Expr t’
Expected type: Expr t
Actual type: AnnExpr t
+ In the first argument of ‘g’, namely ‘e1’
+ In the first argument of ‘(++)’, namely ‘(g e1)’
Relevant bindings include
e2 :: AnnExpr t (bound at tcfail016.hs:9:11)
e1 :: AnnExpr t (bound at tcfail016.hs:9:8)
g :: Expr t -> [[Char]] (bound at tcfail016.hs:8:1)
- In the first argument of ‘g’, namely ‘e1’
- In the first argument of ‘(++)’, namely ‘(g e1)’
tcfail016.hs:9:28:
Couldn't match type ‘(t, Expr t)’ with ‘Expr t’
Expected type: Expr t
Actual type: AnnExpr t
+ In the first argument of ‘g’, namely ‘e2’
+ In the second argument of ‘(++)’, namely ‘(g e2)’
Relevant bindings include
e2 :: AnnExpr t (bound at tcfail016.hs:9:11)
e1 :: AnnExpr t (bound at tcfail016.hs:9:8)
g :: Expr t -> [[Char]] (bound at tcfail016.hs:8:1)
- In the first argument of ‘g’, namely ‘e2’
- In the second argument of ‘(++)’, namely ‘(g e2)’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail032.stderr b/testsuite/tests/typecheck/should_fail/tcfail032.stderr
index 4d41c103da..90888af1b2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail032.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail032.stderr
@@ -5,8 +5,8 @@ tcfail032.hs:14:8:
This (rigid, skolem) type variable is bound by
an expression type signature: Eq a1 => a1 -> Int
at tcfail032.hs:14:8-30
+ In the expression: (x :: (Eq a) => a -> Int)
+ In an equation for ‘f’: f x = (x :: (Eq a) => a -> Int)
Relevant bindings include
x :: t (bound at tcfail032.hs:14:3)
f :: t -> a -> Int (bound at tcfail032.hs:14:1)
- 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 ea517ea7b4..fd2887de60 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail033.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail033.stderr
@@ -1,9 +1,9 @@
tcfail033.hs:4:12:
Occurs check: cannot construct the infinite type: t ~ (t, t1)
+ In the expression: x
+ In the expression: [x | (x, y) <- buglet]
Relevant bindings include
y :: t1 (bound at tcfail033.hs:4:19)
x :: t (bound at tcfail033.hs:4:17)
buglet :: [(t, t1)] (bound at tcfail033.hs:4:1)
- In the expression: x
- In the expression: [x | (x, y) <- buglet]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail065.stderr b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
index 02338415d1..ddb40dd491 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail065.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
@@ -6,8 +6,8 @@ tcfail065.hs:29:20:
at tcfail065.hs:29:3
‘x’ is a rigid type variable bound by
the instance declaration at tcfail065.hs:28:10
+ In the first argument of ‘X’, namely ‘x’
+ In the expression: X x
Relevant bindings include
x :: x1 (bound at tcfail065.hs:29:8)
setX :: x1 -> X x -> X x (bound at tcfail065.hs:29:3)
- In the first argument of ‘X’, namely ‘x’
- In the expression: X x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail068.stderr b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
index d7c8ed7aba..330b1dceb0 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail068.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
@@ -10,12 +10,12 @@ tcfail068.hs:14:9:
at tcfail068.hs:11:10
Expected type: ST s1 (IndTree s a)
Actual type: 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 first argument of ‘runST’, namely
‘(newSTArray ((1, 1), n) x)’
In the expression: runST (newSTArray ((1, 1), n) x)
+ Relevant bindings include
+ itgen :: (Int, Int) -> a -> IndTree s a
+ (bound at tcfail068.hs:12:1)
tcfail068.hs:19:21:
Couldn't match type ‘s’ with ‘s1’
@@ -29,12 +29,12 @@ tcfail068.hs:19:21:
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’
Relevant bindings include
arr :: IndTree s a (bound at tcfail068.hs:17:11)
itiap :: (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
(bound at tcfail068.hs:17:1)
- In the first argument of ‘readSTArray’, namely ‘arr’
- In the first argument of ‘(>>=)’, namely ‘readSTArray arr i’
tcfail068.hs:24:36:
Couldn't match type ‘s’ with ‘s1’
@@ -48,6 +48,8 @@ tcfail068.hs:24:36:
at tcfail068.hs:24:29
Expected type: ST s1 (IndTree s a)
Actual type: ST s (IndTree s a)
+ In the first argument of ‘runST’, namely ‘(itrap' i k)’
+ In the expression: runST (itrap' i k)
Relevant bindings include
itrap' :: Int -> Int -> ST s (IndTree s a)
(bound at tcfail068.hs:26:9)
@@ -57,8 +59,6 @@ tcfail068.hs:24:36:
itrap :: ((Int, Int), (Int, Int))
-> (a -> a) -> IndTree s a -> IndTree s a
(bound at tcfail068.hs:24:1)
- In the first argument of ‘runST’, namely ‘(itrap' i k)’
- In the expression: runST (itrap' i k)
tcfail068.hs:36:46:
Couldn't match type ‘s’ with ‘s1’
@@ -78,6 +78,8 @@ tcfail068.hs:36:46:
at tcfail068.hs:36:40
Expected type: ST s1 (c, IndTree s b)
Actual type: ST s (c, IndTree s b)
+ In the first argument of ‘runST’, namely ‘(itrapstate' i k s)’
+ In the expression: runST (itrapstate' i k s)
Relevant bindings include
itrapstate' :: Int -> Int -> c -> ST s (c, IndTree s b)
(bound at tcfail068.hs:38:9)
@@ -92,5 +94,3 @@ tcfail068.hs:36:46:
-> IndTree s b
-> (c, IndTree s b)
(bound at tcfail068.hs:36:1)
- 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 b5ad5cd2d6..869b9472f3 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail076.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail076.stderr
@@ -9,8 +9,8 @@ tcfail076.hs:18:82:
at tcfail076.hs:18:64
Expected type: m res1
Actual type: m res
+ In the expression: cont a
+ In the first argument of ‘KContT’, namely ‘(\ cont' -> cont a)’
Relevant bindings include
cont' :: b -> m res1 (bound at tcfail076.hs:18:73)
cont :: a -> m res (bound at tcfail076.hs:18:37)
- In the expression: cont a
- In the first argument of ‘KContT’, namely ‘(\ cont' -> cont a)’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail099.stderr b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
index cb3008cf7b..9fdccb3335 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail099.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
@@ -6,9 +6,9 @@ tcfail099.hs:9:20:
a pattern with constructor: C :: forall a. (a -> Int) -> DS,
in an equation for ‘call’
at tcfail099.hs:9:7-9
+ In the first argument of ‘f’, namely ‘arg’
+ In the expression: f arg
Relevant bindings include
arg :: t (bound at tcfail099.hs:9:12)
f :: a -> Int (bound at tcfail099.hs:9:9)
call :: DS -> t -> Int (bound at tcfail099.hs:9:1)
- In the first argument of ‘f’, namely ‘arg’
- In the expression: f arg
diff --git a/testsuite/tests/typecheck/should_fail/tcfail103.stderr b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
index 1b57893608..17a434f0ae 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail103.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
@@ -7,9 +7,9 @@ tcfail103.hs:15:23:
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
Relevant bindings include
g :: ST s Int (bound at tcfail103.hs:15:9)
v :: STRef t Int (bound at tcfail103.hs:12:5)
f :: ST t Int (bound at tcfail103.hs:11:1)
- In the first argument of ‘readSTRef’, namely ‘v’
- In the expression: readSTRef v
diff --git a/testsuite/tests/typecheck/should_fail/tcfail122.stderr b/testsuite/tests/typecheck/should_fail/tcfail122.stderr
index fdd444d1fc..47b391df6d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail122.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail122.stderr
@@ -6,7 +6,6 @@ tcfail122.hs:8:9: error:
a :: * -> *
Expected type: a b
Actual type: c0 d0
- Relevant bindings include foo :: [a b] (bound at tcfail122.hs:7:1)
In the expression:
undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d
In the expression:
@@ -16,3 +15,4 @@ tcfail122.hs:8:9: error:
foo
= [undefined :: forall a b. a b,
undefined :: forall (c :: (* -> *) -> *) (d :: * -> *). c d]
+ Relevant bindings include foo :: [a b] (bound at tcfail122.hs:7:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail131.stderr b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
index cb2bd64e5b..3a209ab5e0 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail131.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
@@ -3,8 +3,8 @@ tcfail131.hs:7:9:
Couldn't match expected type ‘b’ with actual type ‘Integer’
‘b’ is a rigid type variable bound by
the type signature for: g :: Num b => b -> b at tcfail131.hs:6:8
+ In the expression: f x x
+ In an equation for ‘g’: g x = f x x
Relevant bindings include
x :: b (bound at tcfail131.hs:7:5)
g :: b -> b (bound at tcfail131.hs:7:3)
- In the expression: f x x
- In an equation for ‘g’: g x = f x x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail140.stderr b/testsuite/tests/typecheck/should_fail/tcfail140.stderr
index 6908f1d595..09eb70c588 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail140.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail140.stderr
@@ -1,30 +1,30 @@
tcfail140.hs:10:7: error:
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
+ Relevant bindings include bar :: t (bound at tcfail140.hs:10:1)
tcfail140.hs:12:10: error:
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
+ Relevant bindings include
+ rot :: t -> t1 (bound at tcfail140.hs:12:1)
tcfail140.hs:14:15: error:
Couldn't match expected type ‘a -> b’ with actual type ‘Int’
- Relevant bindings include
- xs :: [a] (bound at tcfail140.hs:14:5)
- bot :: [a] -> [b] (bound at tcfail140.hs:14:1)
The operator ‘f’ takes two arguments,
but its type ‘Int -> Int’ has only one
In the first argument of ‘map’, namely ‘(3 `f`)’
In the expression: map (3 `f`) xs
+ Relevant bindings include
+ xs :: [a] (bound at tcfail140.hs:14:5)
+ bot :: [a] -> [b] (bound at tcfail140.hs:14:1)
tcfail140.hs:16:8: error:
The constructor ‘Just’ should have 1 argument, but has been given none
diff --git a/testsuite/tests/typecheck/should_fail/tcfail153.stderr b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
index aafe8a269a..ec46f782ad 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail153.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
@@ -5,12 +5,12 @@ 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
- x :: a (bound at tcfail153.hs:6:3)
- f :: a -> [a] (bound at tcfail153.hs:6:1)
In the expression: g x
In an equation for ‘f’:
f x
= g x
where
g y = if y then [] else [...]
+ Relevant bindings include
+ x :: a (bound at tcfail153.hs:6:3)
+ f :: a -> [a] (bound at tcfail153.hs:6:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail174.stderr b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
index 42aa7a91fa..77bc7416b5 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail174.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
@@ -13,10 +13,10 @@ tcfail174.hs:13:14:
at tcfail174.hs:13:1-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
+ Relevant bindings include
+ h1 :: Capture a (bound at tcfail174.hs:13:1)
tcfail174.hs:16:14:
Couldn't match type ‘a’ with ‘b’
@@ -26,7 +26,7 @@ tcfail174.hs:16:14:
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
+ Relevant bindings include
+ h2 :: Capture b (bound at tcfail174.hs:16:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail175.stderr b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
index 8689fd1a6c..50a2424fcc 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail175.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
@@ -4,7 +4,7 @@ tcfail175.hs:11:1:
with actual type ‘a’
‘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
+ Relevant bindings include
+ evalRHS :: Int -> a (bound at tcfail175.hs:11:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail178.stderr b/testsuite/tests/typecheck/should_fail/tcfail178.stderr
index 7ed00156d6..472e133098 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail178.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail178.stderr
@@ -3,12 +3,12 @@ tcfail178.hs:15:7:
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
+ Relevant bindings include c :: [a] (bound at tcfail178.hs:15:1)
tcfail178.hs:18:7:
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 ()
+ Relevant bindings include d :: [a] (bound at tcfail178.hs:18:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail179.stderr b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
index 51c66e138b..14d2eae435 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail179.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
@@ -8,10 +8,10 @@ tcfail179.hs:14:39:
at tcfail179.hs:14:14
‘s’ is a rigid type variable bound by
the type signature for: run :: T s -> Int at tcfail179.hs:12:8
+ In the first argument of ‘g’, namely ‘x’
+ In the expression: g x id
Relevant bindings include
x :: x (bound at tcfail179.hs:14:26)
g :: s -> (x -> s) -> (x, s, Int) (bound at tcfail179.hs:14:16)
ts :: T s (bound at tcfail179.hs:13:5)
run :: T s -> Int (bound at tcfail179.hs:13:1)
- In the first argument of ‘g’, namely ‘x’
- In the expression: g x id
diff --git a/testsuite/tests/typecheck/should_fail/tcfail182.stderr b/testsuite/tests/typecheck/should_fail/tcfail182.stderr
index 159700512a..4103c3a0fa 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail182.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail182.stderr
@@ -4,7 +4,7 @@ tcfail182.hs:9:3: error:
with actual type ‘Maybe t0’
NB: ‘Maybe’ is defined at tcfail182.hs:6:1-18
‘Prelude.Maybe’ is defined in ‘GHC.Base’ in package ‘base-4.9.0.0’
- 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
+ Relevant bindings include
+ f :: Prelude.Maybe a -> Int (bound at tcfail182.hs:9:1)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail198.stderr b/testsuite/tests/typecheck/should_fail/tcfail198.stderr
index ea764fc846..58cf260593 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail198.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail198.stderr
@@ -5,9 +5,9 @@ tcfail198.hs:6:36: error:
This (rigid, skolem) type variable is bound by
an expression type signature: a2
at tcfail198.hs:6:36-41
+ In the expression: x :: a
+ In the second argument of ‘(++)’, namely ‘[x :: a]’
Relevant bindings include
xs :: [a1] (bound at tcfail198.hs:6:21)
x :: a1 (bound at tcfail198.hs:6:19)
f3 :: [a1] -> [a1] (bound at tcfail198.hs:6:6)
- In the expression: x :: a
- In the second argument of ‘(++)’, namely ‘[x :: a]’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail200.stderr b/testsuite/tests/typecheck/should_fail/tcfail200.stderr
index e5bb82267e..7570047d0c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail200.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail200.stderr
@@ -4,8 +4,8 @@ tcfail200.hs:5:15: error:
When matching types
t1 :: *
Int# :: #
- Relevant bindings include
- x :: (t1, Char) (bound at tcfail200.hs:5:9)
In the expression: 1#
In the expression: (1#, 'c')
In an equation for ‘x’: x = (1#, 'c')
+ Relevant bindings include
+ x :: (t1, Char) (bound at tcfail200.hs:5:9)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail201.stderr b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
index 3e67742bc8..0609229ae8 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail201.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
@@ -6,10 +6,10 @@ tcfail201.hs:17:58: error:
gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
-> (forall g. g -> c g) -> a -> c a
at tcfail201.hs:15:12
+ In the first argument of ‘z’, namely ‘DocEmpty’
+ In the expression: z DocEmpty
Relevant bindings include
hsDoc :: a (bound at tcfail201.hs:16:13)
gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
-> (forall g. g -> c g) -> a -> c a
(bound at tcfail201.hs:16:1)
- In the first argument of ‘z’, namely ‘DocEmpty’
- In the expression: z DocEmpty
diff --git a/testsuite/tests/typecheck/should_fail/tcfail206.stderr b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
index bd3d90df57..5090ee165f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail206.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
@@ -19,10 +19,10 @@ 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,)
+ Relevant bindings include
+ c :: a -> (a, Bool) (bound at tcfail206.hs:11:1)
tcfail206.hs:14:5:
Couldn't match type ‘Bool’ with ‘Int’
@@ -45,7 +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, #)
+ Relevant bindings include
+ f :: a -> (# a, Bool #) (bound at tcfail206.hs:20:1)