summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-04-13 07:47:41 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2012-04-13 07:47:41 +0100
commitf98194b2f81b19d17e5c4db682df89fe66b3ab1e (patch)
tree1d34751e6e431b0b5801b2260a77d29372f2eb77 /testsuite/tests/typecheck/should_fail
parent584f65a63f60bf381b591d03397f5c47caddef91 (diff)
parent125a20ffd85f2cc54693738ba40f33022da8da41 (diff)
downloadhaskell-f98194b2f81b19d17e5c4db682df89fe66b3ab1e.tar.gz
Merge branch 'master' of http://darcs.haskell.org/testsuite
Conflicts: tests/typecheck/should_fail/all.T
Diffstat (limited to 'testsuite/tests/typecheck/should_fail')
-rw-r--r--testsuite/tests/typecheck/should_fail/AssocTyDef03.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/AssocTyDef04.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/AssocTyDef05.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/AssocTyDef06.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr9
-rw-r--r--testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr143
-rw-r--r--testsuite/tests/typecheck/should_fail/IPFail.stderr7
-rw-r--r--testsuite/tests/typecheck/should_fail/T1897a.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/T1899.stderr19
-rw-r--r--testsuite/tests/typecheck/should_fail/T2414.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/T2538.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/T2688.stderr25
-rw-r--r--testsuite/tests/typecheck/should_fail/T2714.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/T2714.stderr42
-rw-r--r--testsuite/tests/typecheck/should_fail/T2846b.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/T2994.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/T3102.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/T3468.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T3540.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T3592.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/T3613.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/T3950.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/T3966.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/T5236.stderr30
-rw-r--r--testsuite/tests/typecheck/should_fail/T5300.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/T5573a.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/T5573b.stderr14
-rwxr-xr-xtestsuite/tests/typecheck/should_fail/T5684.hs62
-rw-r--r--testsuite/tests/typecheck/should_fail/T5684.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/T5689.hs15
-rw-r--r--testsuite/tests/typecheck/should_fail/T5689.stderr7
-rw-r--r--testsuite/tests/typecheck/should_fail/T5858.hs11
-rw-r--r--testsuite/tests/typecheck/should_fail/T5858.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/T5957.hs4
-rw-r--r--testsuite/tests/typecheck/should_fail/T5957.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/T6001.hs9
-rw-r--r--testsuite/tests/typecheck/should_fail/T6001.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T9
-rw-r--r--testsuite/tests/typecheck/should_fail/mc19.stderr7
-rw-r--r--testsuite/tests/typecheck/should_fail/mc20.hs6
-rw-r--r--testsuite/tests/typecheck/should_fail/mc20.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/mc21.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/mc22.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/mc23.stderr45
-rw-r--r--testsuite/tests/typecheck/should_fail/mc24.stderr48
-rw-r--r--testsuite/tests/typecheck/should_fail/mc25.stderr47
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail001.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail005.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail008.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail010.stderr15
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail016.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail017.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail018.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail020.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail028.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail034.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail036.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail040.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail043.stderr25
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail057.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail058.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail063.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail065.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail067.stderr25
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail068.stderr43
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail070.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail072.stderr23
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail076.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail079.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail080.hs4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail080.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail086.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail087.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail094.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail097.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail099.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail100.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail101.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail102.stderr32
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail103.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail104.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail107.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail110.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail113.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail115.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail117.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail125.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail127.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail128.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail129.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail131.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail132.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail133.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail134.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail135.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail136.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail140.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail142.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail143.stderr33
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail146.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail147.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail148.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail151.stderr15
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail152.hs18
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail152.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail153.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail155.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail158.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail161.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail162.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail168.hs1
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail168.stderr15
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail171.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail173.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail174.stderr54
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail175.stderr15
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail177.stderr162
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail178.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail179.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail181.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail186.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail189.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail190.hs6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail190.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail191.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail192.stderr39
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail193.stderr7
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail194.stderr31
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail195.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail196.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail197.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail198.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail201.stderr29
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail206.hs4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail206.stderr95
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail207.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail208.stderr7
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail209.stderr9
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail212.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail215.stderr2
140 files changed, 1308 insertions, 748 deletions
diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef03.stderr b/testsuite/tests/typecheck/should_fail/AssocTyDef03.stderr
index 668857a017..bd7fadfd8c 100644
--- a/testsuite/tests/typecheck/should_fail/AssocTyDef03.stderr
+++ b/testsuite/tests/typecheck/should_fail/AssocTyDef03.stderr
@@ -1,5 +1,5 @@
-
-AssocTyDef03.hs:6:5:
- Wrong category of family instance; declaration was for a data type
- In the type synonym instance default declaration for `Typ'
- In the class declaration for `Cls'
+
+AssocTyDef03.hs:6:5:
+ Wrong category of family instance; declaration was for a data type
+ In the type instance declaration for `Typ'
+ In the class declaration for `Cls'
diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef04.stderr b/testsuite/tests/typecheck/should_fail/AssocTyDef04.stderr
index e7c32f0cad..b7bc7c2fbe 100644
--- a/testsuite/tests/typecheck/should_fail/AssocTyDef04.stderr
+++ b/testsuite/tests/typecheck/should_fail/AssocTyDef04.stderr
@@ -1,7 +1,6 @@
-
-AssocTyDef04.hs:6:18:
- `Maybe' is not applied to enough type arguments
- Expected kind `*', but `Maybe' has kind `* -> *'
- In the type `Maybe'
- In the type synonym instance default declaration for `Typ'
- In the class declaration for `Cls'
+
+AssocTyDef04.hs:6:18:
+ Expecting one more argument to `Maybe'
+ In the type `Maybe'
+ In the type instance declaration for `Typ'
+ In the class declaration for `Cls'
diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef05.stderr b/testsuite/tests/typecheck/should_fail/AssocTyDef05.stderr
index 181f9f6f59..3416a3c44e 100644
--- a/testsuite/tests/typecheck/should_fail/AssocTyDef05.stderr
+++ b/testsuite/tests/typecheck/should_fail/AssocTyDef05.stderr
@@ -1,5 +1,5 @@
-
-AssocTyDef05.hs:6:5:
- Number of parameters must match family declaration; expected 1
- In the type synonym instance default declaration for `Typ'
- In the class declaration for `Cls'
+
+AssocTyDef05.hs:6:5:
+ Number of parameters must match family declaration; expected 1
+ In the type instance declaration for `Typ'
+ In the class declaration for `Cls'
diff --git a/testsuite/tests/typecheck/should_fail/AssocTyDef06.stderr b/testsuite/tests/typecheck/should_fail/AssocTyDef06.stderr
index 417e0f8419..dd88bc3c1f 100644
--- a/testsuite/tests/typecheck/should_fail/AssocTyDef06.stderr
+++ b/testsuite/tests/typecheck/should_fail/AssocTyDef06.stderr
@@ -1,5 +1,5 @@
-
-AssocTyDef06.hs:6:5:
- Number of parameters must match family declaration; expected 1
- In the type synonym instance default declaration for `Typ'
- In the class declaration for `Cls'
+
+AssocTyDef06.hs:6:5:
+ Number of parameters must match family declaration; expected 1
+ In the type instance declaration for `Typ'
+ In the class declaration for `Cls'
diff --git a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
index 229b14a15b..1cf4e9f1cc 100644
--- a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
+++ b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
@@ -1,13 +1,12 @@
FailDueToGivenOverlapping.hs:27:9:
- Overlapping instances for E [t0]
- arising from a use of `eop'
- Matching instances:
- instance E [a] -- Defined at FailDueToGivenOverlapping.hs:21:10
+ Overlapping instances for E [t0] arising from a use of `eop'
Matching givens (or their superclasses):
(E [Int])
bound by the type signature for bar :: E [Int] => () -> ()
- at FailDueToGivenOverlapping.hs:27:1-23
+ at FailDueToGivenOverlapping.hs:26:8-26
+ Matching instances:
+ instance E [a] -- Defined at FailDueToGivenOverlapping.hs:21:10
(The choice depends on the instantiation of `t0')
In the expression: eop [undefined]
In an equation for `bar': bar _ = eop [undefined]
diff --git a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
index 193d356190..d4ce2ce007 100644
--- a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
+++ b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
@@ -1,73 +1,70 @@
-
-FrozenErrorTests.hs:11:1:
- Couldn't match type `a' with `T a'
- `a' is a rigid type variable bound by
- the type signature for foo :: a ~ T a => a -> a
- at FrozenErrorTests.hs:11:1
- Inaccessible code in
- the type signature for foo :: a ~ T a => a -> a
-
-FrozenErrorTests.hs:14:12:
- Couldn't match type `b' with `T b'
- `b' is a rigid type variable bound by
- a pattern with constructor
- MkT2 :: forall a b. b ~ T b => b -> T a,
- in a case alternative
- at FrozenErrorTests.hs:14:12
- Inaccessible code in
- a pattern with constructor
- MkT2 :: forall a b. b ~ T b => b -> T a,
- in a case alternative
- In the pattern: MkT2 y
- In a case alternative: MkT2 y -> ()
- In the expression: case x of { MkT2 y -> () }
-
-FrozenErrorTests.hs:19:12:
- Couldn't match type `Int' with `Bool'
- Inaccessible code in
- a pattern with constructor
- MkT3 :: forall a. a ~ Bool => T a,
- in a case alternative
- In the pattern: MkT3
- In a case alternative: MkT3 -> ()
- In the expression: case x of { MkT3 -> () }
-
-FrozenErrorTests.hs:33:9:
- Occurs check: cannot construct the infinite type: a0 = [a0]
- In the expression: goo1 False undefined
- In an equation for `test1': test1 = goo1 False undefined
-
-FrozenErrorTests.hs:36:15:
- Couldn't match type `[Int]' with `Int'
- In the first argument of `goo2', namely `(goo1 False undefined)'
- In the expression: goo2 (goo1 False undefined)
- In an equation for `test2': test2 = goo2 (goo1 False undefined)
-
-FrozenErrorTests.hs:37:9:
- Couldn't match type `Int' with `[Int]'
- In the expression: goo1 False (goo2 undefined)
- In an equation for `test3': test3 = goo1 False (goo2 undefined)
-
-FrozenErrorTests.hs:52:15:
- Occurs check: cannot construct the infinite type:
- c0 = T2 (T2 c0 c0) c0
- 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)
-
-FrozenErrorTests.hs:52:15:
- Couldn't match type `T2 c0' with `M'
- 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)
-
-FrozenErrorTests.hs:53:9:
- Occurs check: cannot construct the infinite type:
- c0 = T2 (T2 c0 c0) c0
- In the expression: goo3 False (goo4 undefined)
- In an equation for `test5': test5 = goo3 False (goo4 undefined)
-
-FrozenErrorTests.hs:53:9:
- Couldn't match type `T2 c0' with `M'
- In the expression: goo3 False (goo4 undefined)
- In an equation for `test5': test5 = goo3 False (goo4 undefined)
+
+FrozenErrorTests.hs:10:8:
+ Couldn't match type `a' with `T a'
+ `a' is a rigid type variable bound by
+ the type signature for foo :: a ~ T a => a -> a
+ at FrozenErrorTests.hs:10:15
+ Inaccessible code in
+ the type signature for foo :: a ~ T a => a -> a
+
+FrozenErrorTests.hs:14:12:
+ Couldn't match type `b' with `T b'
+ `b' is a rigid type variable bound by
+ a pattern with constructor
+ MkT2 :: forall a b. b ~ T b => b -> T a,
+ in a case alternative
+ at FrozenErrorTests.hs:14:12
+ Inaccessible code in
+ a pattern with constructor
+ MkT2 :: forall a b. b ~ T b => b -> T a,
+ in a case alternative
+ In the pattern: MkT2 y
+ In a case alternative: MkT2 y -> ()
+ In the expression: case x of { MkT2 y -> () }
+
+FrozenErrorTests.hs:19:12:
+ Couldn't match type `Int' with `Bool'
+ Inaccessible code in
+ a pattern with constructor
+ MkT3 :: forall a. a ~ Bool => T a,
+ in a case alternative
+ In the pattern: MkT3
+ In a case alternative: MkT3 -> ()
+ In the expression: case x of { MkT3 -> () }
+
+FrozenErrorTests.hs:33:9:
+ Occurs check: cannot construct the infinite type: a0 = [a0]
+ Expected type: [a0]
+ Actual type: F a0 Bool
+ In the expression: goo1 False undefined
+ In an equation for `test1': test1 = goo1 False undefined
+
+FrozenErrorTests.hs:36:15:
+ Couldn't match type `Int' with `[Int]'
+ Expected type: [[Int]]
+ Actual type: F [Int] Bool
+ In the first argument of `goo2', namely `(goo1 False undefined)'
+ In the expression: goo2 (goo1 False undefined)
+ In an equation for `test2': test2 = goo2 (goo1 False undefined)
+
+FrozenErrorTests.hs:37:9:
+ Couldn't match type `[Int]' with `Int'
+ Expected type: [[Int]]
+ Actual type: F [Int] Bool
+ In the expression: goo1 False (goo2 undefined)
+ In an equation for `test3': test3 = goo1 False (goo2 undefined)
+
+FrozenErrorTests.hs:52:15:
+ Couldn't match type `T2 c0 c0' with `M (T2 (T2 c0 c0) c0)'
+ Expected type: T2 (M (T2 (T2 c0 c0) c0)) (T2 (T2 c0 c0) c0)
+ Actual type: F (T2 (T2 c0 c0) c0) Bool
+ 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)
+
+FrozenErrorTests.hs:53:9:
+ Couldn't match type `T2 c0 c0' with `M (T2 (T2 c0 c0) c0)'
+ Expected type: T2 (M (T2 (T2 c0 c0) c0)) (T2 (T2 c0 c0) c0)
+ Actual type: F (T2 (T2 c0 c0) c0) Bool
+ In the expression: goo3 False (goo4 undefined)
+ In an equation for `test5': test5 = goo3 False (goo4 undefined)
diff --git a/testsuite/tests/typecheck/should_fail/IPFail.stderr b/testsuite/tests/typecheck/should_fail/IPFail.stderr
index 7d0d8980af..efad8b3d56 100644
--- a/testsuite/tests/typecheck/should_fail/IPFail.stderr
+++ b/testsuite/tests/typecheck/should_fail/IPFail.stderr
@@ -3,11 +3,8 @@ IPFail.hs:6:18:
Could not deduce (Num Bool) arising from the literal `5'
from the context (?x::Int)
bound by the type signature for f0 :: (?x::Int) => () -> Bool
- at IPFail.hs:6:1-24
- Possible fix:
- add (Num Bool) to the context of
- the type signature for f0 :: (?x::Int) => () -> Bool
- or add an instance declaration for (Num 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/T1897a.stderr b/testsuite/tests/typecheck/should_fail/T1897a.stderr
index bbbf8260bd..6e5ee1c7a9 100644
--- a/testsuite/tests/typecheck/should_fail/T1897a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1897a.stderr
@@ -1,8 +1,12 @@
T1897a.hs:9:1:
- Ambiguous type variable `a0' in the constraint:
- (Wob a0 b) arising from the ambiguity check for `foo'
- Probable fix: add a type signature that fixes these type variable(s)
+ Could not deduce (Wob a0 b)
+ arising from the ambiguity check for `foo'
+ from the context (Wob a b)
+ bound by the inferred type for `foo': Wob a b => b -> [b]
+ at T1897a.hs:9:1-24
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
When checking that `foo'
has the inferred type `forall a b. Wob a b => b -> [b]'
Probable cause: the inferred type is ambiguous
diff --git a/testsuite/tests/typecheck/should_fail/T1899.stderr b/testsuite/tests/typecheck/should_fail/T1899.stderr
index b0c017351a..d7ab2be5ed 100644
--- a/testsuite/tests/typecheck/should_fail/T1899.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1899.stderr
@@ -1,10 +1,9 @@
-
-T1899.hs:14:36:
- Couldn't match type `a' with `Proposition a0'
- `a' is a rigid type variable bound by
- the type signature for transRHS :: [a] -> Int -> Constraint a
- at T1899.hs:10:2
- Expected type: [Proposition a0]
- Actual type: [a]
- In the first argument of `Auxiliary', namely `varSet'
- In the first argument of `Prop', namely `(Auxiliary varSet)'
+
+T1899.hs:12:29:
+ Couldn't match expected type `a' with actual type `Proposition a0'
+ `a' is a rigid type variable bound by
+ the type signature for transRHS :: [a] -> Int -> Constraint a
+ at T1899.hs:9:14
+ 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 030bf6e52a..5fa8f0060a 100644
--- a/testsuite/tests/typecheck/should_fail/T2414.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2414.stderr
@@ -5,3 +5,4 @@ T2414.hs:9:13:
Actual type: b0 -> Maybe b0
In the first argument of `unfoldr', namely `Just'
In the expression: unfoldr Just
+ In an equation for `f': f = unfoldr Just
diff --git a/testsuite/tests/typecheck/should_fail/T2538.stderr b/testsuite/tests/typecheck/should_fail/T2538.stderr
index e4e9a7551a..b2d1d3aeb6 100644
--- a/testsuite/tests/typecheck/should_fail/T2538.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2538.stderr
@@ -1,14 +1,14 @@
-
-T2538.hs:6:1:
- Illegal polymorphic or qualified type: Eq a => a -> a
- Perhaps you intended to use -XRankNTypes or -XRank2Types
- In the type signature for `f': f :: (Eq a => a -> a) -> Int
-
-T2538.hs:9:1:
- Illegal polymorphic or qualified type: Eq a => a -> a
- Perhaps you intended to use -XImpredicativeTypes
- In the type signature for `g': g :: [Eq a => a -> a] -> Int
-
-T2538.hs:12:1:
- Illegal polymorphic or qualified type: Eq a => a -> a
- In the type signature for `h': h :: Ix (Eq a => a -> a) => Int
+
+T2538.hs:6:6:
+ Illegal polymorphic or qualified type: Eq a => a -> a
+ Perhaps you intended to use -XRankNTypes or -XRank2Types
+ In the type signature for `f': f :: (Eq a => a -> a) -> Int
+
+T2538.hs:9:6:
+ Illegal polymorphic or qualified type: Eq a => a -> a
+ Perhaps you intended to use -XImpredicativeTypes
+ In the type signature for `g': g :: [Eq a => a -> a] -> Int
+
+T2538.hs:12:6:
+ Illegal polymorphic or qualified type: Eq a => a -> a
+ In the type signature for `h': h :: Ix (Eq a => a -> a) => Int
diff --git a/testsuite/tests/typecheck/should_fail/T2688.stderr b/testsuite/tests/typecheck/should_fail/T2688.stderr
index 817c7202e5..aa896569b9 100644
--- a/testsuite/tests/typecheck/should_fail/T2688.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2688.stderr
@@ -1,12 +1,13 @@
-
-T2688.hs:8:14:
- Could not deduce (s ~ v)
- from the context (VectorSpace v s)
- bound by the class declaration for `VectorSpace'
- at T2688.hs:(5,1)-(8,23)
- `s' is a rigid type variable bound by
- 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 expression: v *^ (1 / s)
- In an equation for `^/': v ^/ s = v *^ (1 / s)
+
+T2688.hs:8:22:
+ Could not deduce (v ~ s)
+ from the context (VectorSpace v s)
+ bound by the class declaration for `VectorSpace'
+ at T2688.hs:(5,1)-(8,23)
+ `v' is a rigid type variable bound by
+ 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
+ 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.hs b/testsuite/tests/typecheck/should_fail/T2714.hs
index 80f838c37c..b27acb735b 100644
--- a/testsuite/tests/typecheck/should_fail/T2714.hs
+++ b/testsuite/tests/typecheck/should_fail/T2714.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE ScopedTypeVariables, RankNTypes #-}
-- Trac #2714
diff --git a/testsuite/tests/typecheck/should_fail/T2714.stderr b/testsuite/tests/typecheck/should_fail/T2714.stderr
index da355fc738..481a3bdb15 100644
--- a/testsuite/tests/typecheck/should_fail/T2714.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2714.stderr
@@ -1,22 +1,20 @@
-
-T2714.hs:8:5:
- Couldn't match type `a' with `f0 b'
- `a' is a rigid type variable bound by
- the type signature for f :: ((a -> b) -> b) -> forall c. c -> a
- at T2714.hs:8:1
- Expected type: ((a -> b) -> b) -> c -> a
- Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
- In the expression: ffmap
- In an equation for `f': f = ffmap
-
-T2714.hs:8:5:
- Couldn't match type `c' with `f0 (f0 b -> b)'
- `c' is a rigid type variable bound by
- the type signature for f :: ((a -> b) -> b) -> c -> a
- at T2714.hs:8:1
- Expected type: c
- Actual type: f0 (a -> b)
- Expected type: ((a -> b) -> b) -> c -> a
- Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
- In the expression: ffmap
- In an equation for `f': f = ffmap
+
+T2714.hs:8:5:
+ Couldn't match type `a' with `f0 b'
+ `a' is a rigid type variable bound by
+ the type signature for f :: ((a -> b) -> b) -> forall c. c -> a
+ at T2714.hs:7:6
+ Expected type: ((a -> b) -> b) -> c -> a
+ Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
+ In the expression: ffmap
+ In an equation for `f': f = ffmap
+
+T2714.hs:8:5:
+ Couldn't match type `c' with `f0 (f0 b -> b)'
+ `c' is a rigid type variable bound by
+ the type signature for f :: ((a -> b) -> b) -> c -> a
+ at T2714.hs:8:1
+ Expected type: ((a -> b) -> b) -> c -> a
+ Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
+ 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 79527c15b7..56b1a13ab0 100644
--- a/testsuite/tests/typecheck/should_fail/T2846b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2846b.stderr
@@ -1,7 +1,6 @@
T2846b.hs:5:5:
- No instance for (Show (Num a0 => a0))
- arising from a use of `show'
+ 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/T2994.stderr b/testsuite/tests/typecheck/should_fail/T2994.stderr
index 1e3bd0a434..feceed77b5 100644
--- a/testsuite/tests/typecheck/should_fail/T2994.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2994.stderr
@@ -1,14 +1,10 @@
T2994.hs:11:10:
- `MonadReader Int' is not applied to enough type arguments
- Expected kind `Constraint',
- but `MonadReader Int' has kind `* -> Constraint'
+ Expecting one more argument to `MonadReader Int'
In the instance declaration for `MonadReader Int'
T2994.hs:13:23:
- `Reader' r' is not applied to enough type arguments
- The first argument of `MonadReader' should have kind `*',
- but `Reader' r' has kind `* -> *'
+ Expecting one more argument to `Reader' r'
In the instance declaration for `MonadReader (Reader' r)'
T2994.hs:15:10:
diff --git a/testsuite/tests/typecheck/should_fail/T3102.stderr b/testsuite/tests/typecheck/should_fail/T3102.stderr
index cf3483870d..0cf9d52187 100644
--- a/testsuite/tests/typecheck/should_fail/T3102.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3102.stderr
@@ -7,3 +7,4 @@ T3102.hs:11:12:
Actual type: ((?p::Int) => a0) -> String
In the first argument of `f', namely `t'
In the expression: f t
+ In an equation for `result': result = f t
diff --git a/testsuite/tests/typecheck/should_fail/T3468.stderr b/testsuite/tests/typecheck/should_fail/T3468.stderr
index 45400bc1ea..ac040ba05d 100644
--- a/testsuite/tests/typecheck/should_fail/T3468.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3468.stderr
@@ -2,9 +2,11 @@
T3468.hs-boot:3:6:
Type constructor `Tool' has conflicting definitions in the module and its hs-boot file
Main module: data Tool d
+ No C type associated
RecFlag Recursive
= F :: forall d a r. a -> Tool d Stricts: _
FamilyInstance: none
Boot file: abstract(False) Tool
+ No C type associated
RecFlag NonRecursive
FamilyInstance: none
diff --git a/testsuite/tests/typecheck/should_fail/T3540.stderr b/testsuite/tests/typecheck/should_fail/T3540.stderr
index fb711cd5a1..6b85638e1e 100644
--- a/testsuite/tests/typecheck/should_fail/T3540.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3540.stderr
@@ -1,25 +1,20 @@
T3540.hs:4:12:
Predicate `a ~ Int' used as a type
- Expected kind `??', but `a ~ Int' has kind `Constraint'
In the type signature for `thing': thing :: a ~ Int
T3540.hs:7:20:
Predicate `a ~ Int' used as a type
- Expected kind `?', but `a ~ Int' has kind `Constraint'
In the type signature for `thing1': thing1 :: Int -> (a ~ Int)
T3540.hs:10:13:
Predicate `a ~ Int' used as a type
- Expected kind `??', but `a ~ Int' has kind `Constraint'
In the type signature for `thing2': thing2 :: (a ~ Int) -> Int
T3540.hs:13:12:
Predicate `?dude :: Int' used as a type
- Expected kind `??', but `?dude :: Int' has kind `Constraint'
In the type signature for `thing3': thing3 :: (?dude :: Int) -> Int
T3540.hs:16:11:
Predicate `Eq a' used as a type
- Expected kind `??', but `Eq a' has kind `Constraint'
In the type signature for `thing4': thing4 :: (Eq a) -> Int
diff --git a/testsuite/tests/typecheck/should_fail/T3592.stderr b/testsuite/tests/typecheck/should_fail/T3592.stderr
index ce3eb90195..477c3aa675 100644
--- a/testsuite/tests/typecheck/should_fail/T3592.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3592.stderr
@@ -1,14 +1,14 @@
-
-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
-
-T3592.hs:11:12:
- No instance for (Show a)
- arising from a use of `x'
- In the first argument of `show', namely `x'
- In the expression: show x
- In an equation for `g': g x = show x
+
+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
+
+T3592.hs:11:7:
+ No instance for (Show a) arising from a use of `show'
+ Possible fix:
+ add (Show a) to the context of
+ the type signature for g :: T a -> String
+ In the expression: show x
+ In an equation for `g': g x = show x
diff --git a/testsuite/tests/typecheck/should_fail/T3613.stderr b/testsuite/tests/typecheck/should_fail/T3613.stderr
index feb46416df..1373b7143d 100644
--- a/testsuite/tests/typecheck/should_fail/T3613.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3613.stderr
@@ -1,12 +1,16 @@
T3613.hs:14:20:
- Couldn't match expected type `Maybe a0' with actual type `IO ()'
+ Couldn't match type `IO' with `Maybe'
+ Expected type: Maybe ()
+ Actual type: IO ()
In the first argument of `(>>)', namely `bar'
In the first argument of `fooThen', namely `(bar >> undefined)'
In the expression: fooThen (bar >> undefined)
T3613.hs:17:24:
- Couldn't match expected type `Maybe a0' with actual type `IO ()'
+ Couldn't match type `IO' with `Maybe'
+ Expected type: Maybe ()
+ Actual type: IO ()
In a stmt of a 'do' block: bar
In the first argument of `fooThen', namely
`(do { bar;
diff --git a/testsuite/tests/typecheck/should_fail/T3950.stderr b/testsuite/tests/typecheck/should_fail/T3950.stderr
index 8eb1ab9a4d..876a4997c5 100644
--- a/testsuite/tests/typecheck/should_fail/T3950.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3950.stderr
@@ -1,7 +1,10 @@
T3950.hs:15:13:
- Couldn't match expected type `Id p' with actual type `Id p0 x0'
+ Couldn't match kind `* -> *' with `*'
Expected type: w (Id p)
Actual type: Sealed (Id p0 x0)
+ Kind incompatibility when matching types:
+ w :: (* -> * -> *) -> *
+ Sealed :: (* -> *) -> *
In the first argument of `Just', namely rp'
In the expression: Just rp'
diff --git a/testsuite/tests/typecheck/should_fail/T3966.stderr b/testsuite/tests/typecheck/should_fail/T3966.stderr
index b24087ff8b..9b081582a3 100644
--- a/testsuite/tests/typecheck/should_fail/T3966.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3966.stderr
@@ -1,9 +1,8 @@
-
-T3966.hs:6:16:
- Warning: Ignoring unusable UNPACK pragma on the
- first argument of `Foo'
- In the definition of data constructor `Foo'
- In the data type declaration for `Foo'
-
-<no location info>:
-Failing due to -Werror.
+
+T3966.hs:6:16: Warning:
+ Ignoring unusable UNPACK pragma on the first argument of `Foo'
+ In the definition of data constructor `Foo'
+ In the data declaration for `Foo'
+
+<no location info>:
+Failing due to -Werror.
diff --git a/testsuite/tests/typecheck/should_fail/T5236.stderr b/testsuite/tests/typecheck/should_fail/T5236.stderr
index 76f6de2353..a2da439690 100644
--- a/testsuite/tests/typecheck/should_fail/T5236.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5236.stderr
@@ -1,20 +1,10 @@
-
-T5236.hs:17:5:
- Couldn't match type `A' with `B'
- When using functional dependencies to combine
- Id A A,
- arising from the dependency `a -> b'
- in the instance declaration at T5236.hs:10:10
- Id A B, arising from a use of `loop' at T5236.hs:17:5-8
- In the expression: loop
- In an equation for `f': f = loop
-
-T5236.hs:17:5:
- Couldn't match type `B' with `A'
- When using functional dependencies to combine
- Id B B,
- arising from the dependency `b -> a'
- in the instance declaration at T5236.hs:11:10
- Id A B, arising from a use of `loop' at T5236.hs:17:5-8
- In the expression: loop
- In an equation for `f': f = loop
+
+T5236.hs:17:5:
+ Couldn't match type `A' with `B'
+ When using functional dependencies to combine
+ Id A A,
+ arising from the dependency `a -> b'
+ in the instance declaration at T5236.hs:10:10
+ Id A B, arising from a use of `loop' at T5236.hs:17:5-8
+ In the expression: loop
+ In an equation for `f': f = loop
diff --git a/testsuite/tests/typecheck/should_fail/T5300.stderr b/testsuite/tests/typecheck/should_fail/T5300.stderr
index bc3bc066b5..272f8b5762 100644
--- a/testsuite/tests/typecheck/should_fail/T5300.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5300.stderr
@@ -1,8 +1,13 @@
T5300.hs:15:9:
- Ambiguous type variable `c0' in the constraint:
- (C1 a1 b2 c0) arising from a use of `f1'
- Probable fix: add a type signature that fixes these type variable(s)
+ Could not deduce (C1 a1 b2 c0) arising from a use of `f1'
+ from the context (Monad m, C1 a1 b1 c1, C2 a2 b2 c2)
+ bound by the type signature for
+ f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
+ a1 -> StateT (T b2) m a2
+ at T5300.hs:14:7-69
+ The type variable `c0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
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/T5573a.stderr b/testsuite/tests/typecheck/should_fail/T5573a.stderr
index f11c123951..52aa99ae71 100644
--- a/testsuite/tests/typecheck/should_fail/T5573a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5573a.stderr
@@ -1,16 +1,16 @@
T5573a.hs:11:16:
- Couldn't match kind `??' against `(#)'
+ Couldn't match kind `ArgKind' against `(#)'
Kind incompatibility when matching types:
- t0 :: ??
- (# t1, t2 #) :: (#)
+ t0 :: ArgKind
+ (# t0, t1 #) :: (#)
In the expression: (# True, False #)
In the expression: (# x, (# True, False #) #)
T5573a.hs:14:6:
- Couldn't match kind `??' against `(#)'
+ Couldn't match kind `ArgKind' against `(#)'
Kind incompatibility when matching types:
- t0 :: ??
- (# t1, t2 #) :: (#)
+ t0 :: ArgKind
+ (# t0, t1 #) :: (#)
In the pattern: (# x, y #)
In an equation for `foo3': foo3 (# x, y #) = x
diff --git a/testsuite/tests/typecheck/should_fail/T5573b.stderr b/testsuite/tests/typecheck/should_fail/T5573b.stderr
index 8cc09c266a..b2cbf6d0eb 100644
--- a/testsuite/tests/typecheck/should_fail/T5573b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5573b.stderr
@@ -1,7 +1,7 @@
-
-T5573b.hs:6:22:
- Kind mis-match
- The first argument of an unboxed tuple should have kind `??',
- but `(# Double#, Double# #)' has kind `(#)'
- In the type signature for `foo':
- foo :: Double# -> (# (# Double#, Double# #), Double# #)
+
+T5573b.hs:6:22:
+ Kind mis-match
+ The first argument of an unboxed tuple should have kind `ArgKind',
+ but `(# Double#, Double# #)' has kind `(#)'
+ In the type signature for `foo':
+ foo :: Double# -> (# (# Double#, Double# #), Double# #)
diff --git a/testsuite/tests/typecheck/should_fail/T5684.hs b/testsuite/tests/typecheck/should_fail/T5684.hs
new file mode 100755
index 0000000000..a8c72595d0
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T5684.hs
@@ -0,0 +1,62 @@
+{-# OPTIONS -XFunctionalDependencies -XUndecidableInstances -XFlexibleInstances #-}
+
+module T5684 where
+
+class B a b | a -> b where
+ op :: a -> b -> ()
+
+class A a
+
+instance A b => B Bool b
+
+{- This used to be a bug in various versions of GHC <= 7.2.2
+ The source of the problem is the kicking out of inert Solved goals back to
+ the worklist, which violated our invariant that when two constraints of the
+ same class meet (workitem-inert) then the combination (Given-Wanted) is impossible.
+ Actually it turns our that it is possible. The order in which the constraints appear
+ below is important so we add two combinations to make sure that the testcase is
+ order-insensitive. -}
+
+flop1 = [ op False False -- (3) Creates a functional dependency which kicks the solved out
+ -- back in the worklist. Next time round the solved workitem
+ -- meets the wanted from stage (2) and boom, the assertion fails!
+
+ , op 'c' undefined -- (2) Creates a ([W] B Char beta) permanently in inerts
+ , op True undefined -- (1) Creates ([W] B Bool alpha)
+ -- which immediately becomes [S] B Bool alpha
+ ]
+
+flop2 = [ op False False
+ , op True undefined
+ , op 'c' undefined
+ ]
+
+
+flop3 = [ op 'c' undefined
+ , op True undefined
+ , op False False
+ ]
+
+flop4 = [ op 'c' undefined
+ , op False False
+ , op True undefined
+ ]
+
+
+flop5 = [ op True undefined
+ , op 'c' undefined
+ , op False False
+ ]
+
+
+flop6 = [ op True undefined
+ , op False False
+ , op 'c' undefined
+ ]
+
+
+{- Now, in HEAD we no longer have cached GivenSolved goals in the inerts and hence
+ this situation can no longer appear. If a Given gets kicked out it is only because
+ it got rewritten by a given equality: Notice that since Givens now never contain
+ plain old unification variables (since they are not GivenSolveds!) they can never be
+ rewritten by a spontaneously solved either! So our invariant now holds. -}
diff --git a/testsuite/tests/typecheck/should_fail/T5684.stderr b/testsuite/tests/typecheck/should_fail/T5684.stderr
new file mode 100644
index 0000000000..0aa8b17973
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T5684.stderr
@@ -0,0 +1,10 @@
+
+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]
diff --git a/testsuite/tests/typecheck/should_fail/T5689.hs b/testsuite/tests/typecheck/should_fail/T5689.hs
new file mode 100644
index 0000000000..8e023fec54
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T5689.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+
+module Main where
+import Data.IORef
+
+main :: IO ()
+main = do { (r :: IORef (t -> t)) <- newIORef id
+ -- r <- newIORef i -- => Type-check error
+
+ ; writeIORef r (\v -> if v then False else True)
+
+ ; c <- readIORef r
+
+ ; print $ c True
+ ; print $ c 1234 }
diff --git a/testsuite/tests/typecheck/should_fail/T5689.stderr b/testsuite/tests/typecheck/should_fail/T5689.stderr
new file mode 100644
index 0000000000..28f9c01940
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T5689.stderr
@@ -0,0 +1,7 @@
+
+T5689.hs:10:36:
+ Couldn't match expected type `t' with actual type `Bool'
+ In the expression: v
+ In the expression: if v then False else True
+ In the second argument of `writeIORef', namely
+ `(\ v -> if v then False else True)'
diff --git a/testsuite/tests/typecheck/should_fail/T5858.hs b/testsuite/tests/typecheck/should_fail/T5858.hs
new file mode 100644
index 0000000000..01a991fb44
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T5858.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE FlexibleInstances, GADTs #-}
+module T5858 where
+
+class InferOverloaded a where
+ infer :: a -> String
+
+-- instance (t1 ~ String, t2 ~ String) => InferOverloaded (t1,t2) where
+instance (t1 ~ String) => InferOverloaded (t1,t1) where
+ infer = show . fst
+
+foo = infer ([],[])
diff --git a/testsuite/tests/typecheck/should_fail/T5858.stderr b/testsuite/tests/typecheck/should_fail/T5858.stderr
new file mode 100644
index 0000000000..5e0cf1521b
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T5858.stderr
@@ -0,0 +1,13 @@
+
+T5858.hs:11:7:
+ No instance for (InferOverloaded ([a0], [a1]))
+ arising from a use of `infer'
+ The type variables `a0', `a1' are ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ 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/T5957.hs b/testsuite/tests/typecheck/should_fail/T5957.hs
new file mode 100644
index 0000000000..c168a00f3a
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T5957.hs
@@ -0,0 +1,4 @@
+module T5957 where
+
+flex :: Int -> Show a => a -> String
+flex i a = show a ++ show i
diff --git a/testsuite/tests/typecheck/should_fail/T5957.stderr b/testsuite/tests/typecheck/should_fail/T5957.stderr
new file mode 100644
index 0000000000..c0bc12a7a2
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T5957.stderr
@@ -0,0 +1,6 @@
+
+T5957.hs:3:9:
+ Illegal polymorphic or qualified type: Show a => a -> String
+ Perhaps you intended to use -XRankNTypes or -XRank2Types
+ In the type signature for `flex':
+ flex :: Int -> Show a => a -> String
diff --git a/testsuite/tests/typecheck/should_fail/T6001.hs b/testsuite/tests/typecheck/should_fail/T6001.hs
new file mode 100644
index 0000000000..fd918aa598
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T6001.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE InstanceSigs #-}
+
+module T6001 where
+
+data DayKind = Work | Rest
+
+instance Num DayKind where
+ fromInteger :: Int -> DayKind
+ fromInteger = undefined
diff --git a/testsuite/tests/typecheck/should_fail/T6001.stderr b/testsuite/tests/typecheck/should_fail/T6001.stderr
new file mode 100644
index 0000000000..7fe591d54f
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T6001.stderr
@@ -0,0 +1,5 @@
+
+T6001.hs:8:18:
+ Method signature does not match class; it should be
+ fromInteger :: Integer -> DayKind
+ In the instance declaration for `Num DayKind'
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 91f759d134..42e0364371 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -67,7 +67,7 @@ test('tcfail076', normal, compile_fail, [''])
test('tcfail077', normal, compile_fail, [''])
test('tcfail078', normal, compile_fail, [''])
test('tcfail079', only_compiler_types(['ghc']), compile_fail, [''])
-test('tcfail080', if_compiler_type('ghc', expect_fail), compile_fail, [''])
+test('tcfail080', normal, compile_fail, [''])
test('tcfail082', normal, compile_fail, [''])
test('tcfail083', normal, compile_fail, [''])
test('tcfail084', normal, compile_fail, [''])
@@ -145,7 +145,7 @@ test('tcfail154', normal, compile_fail, [''])
test('tcfail155', normal, compile_fail, [''])
test('tcfail156', normal, compile_fail, [''])
test('tcfail157', normal, compile_fail, [''])
-test('tcfail158', expect_fail, compile_fail, [''])
+test('tcfail158', normal, compile_fail, [''])
test('tcfail159', normal, compile_fail, [''])
test('tcfail160', normal, compile_fail, [''])
test('tcfail161', normal, compile_fail, [''])
@@ -269,3 +269,8 @@ test('T5570', normal, compile_fail, [''])
test('T5573a', normal, compile_fail, [''])
test('T5573b', normal, compile_fail, [''])
test('T5691', normal, compile_fail, [''])
+test('T5689', normal, compile_fail, [''])
+test('T5684', normal, compile_fail, [''])
+test('T5858', normal, compile_fail, [''])
+test('T5957', normal, compile_fail, [''])
+test('T6001', normal, compile_fail, [''])
diff --git a/testsuite/tests/typecheck/should_fail/mc19.stderr b/testsuite/tests/typecheck/should_fail/mc19.stderr
index f77da6fe4b..7015d47d74 100644
--- a/testsuite/tests/typecheck/should_fail/mc19.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc19.stderr
@@ -1,7 +1,10 @@
mc19.hs:10:31:
- Occurs check: cannot construct the infinite type: a0 = [a0]
+ Couldn't match type `a' with `[a]'
+ `a' is a rigid type variable bound by
+ a type expected by the context: [a] -> [a] at mc19.hs:10:26
Expected type: [a] -> [a]
- Actual type: [a0] -> [[a0]]
+ Actual type: [a] -> [[a]]
In the expression: inits
In a stmt of a monad comprehension: then inits
+ In the expression: [x | x <- [3, 2, 1], then inits]
diff --git a/testsuite/tests/typecheck/should_fail/mc20.hs b/testsuite/tests/typecheck/should_fail/mc20.hs
index 4dd0fe2fe5..efdfd5b453 100644
--- a/testsuite/tests/typecheck/should_fail/mc20.hs
+++ b/testsuite/tests/typecheck/should_fail/mc20.hs
@@ -1,13 +1,15 @@
--- Checks that the ordering constraint on the implicit groupWith is respected
+-- Checks that the ordering constraint on the groupWith function is respected
{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module ShouldFail where
+import GHC.Exts (groupWith)
+
data Unorderable = Gnorf | Pinky | Brain
foo = [ ()
| x <- [Gnorf, Brain]
- , then group by x
+ , then group by x using groupWith
]
diff --git a/testsuite/tests/typecheck/should_fail/mc20.stderr b/testsuite/tests/typecheck/should_fail/mc20.stderr
index 1214b6ac17..ee9bb4b39f 100644
--- a/testsuite/tests/typecheck/should_fail/mc20.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc20.stderr
@@ -1,8 +1,9 @@
-mc20.hs:12:9:
+mc20.hs:14:31:
No instance for (Ord Unorderable)
- arising from a use of `Control.Monad.Group.mgroupWith'
+ arising from a use of `groupWith'
Possible fix: add an instance declaration for (Ord Unorderable)
- In the expression: Control.Monad.Group.mgroupWith
- In a stmt of a monad comprehension: then group by x
- In the expression: [() | x <- [Gnorf, Brain], then group by x]
+ In the expression: groupWith
+ In a stmt of a monad comprehension: then group by x using groupWith
+ In the expression:
+ [() | x <- [Gnorf, Brain], then group by x using groupWith]
diff --git a/testsuite/tests/typecheck/should_fail/mc21.stderr b/testsuite/tests/typecheck/should_fail/mc21.stderr
index c712b4b4be..bd7bac1dd9 100644
--- a/testsuite/tests/typecheck/should_fail/mc21.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc21.stderr
@@ -4,6 +4,7 @@ mc21.hs:12:26:
`a' is a rigid type variable bound by
a type expected by the context: [a] -> [[a]] at mc21.hs:12:9
Expected type: [a] -> [[a]]
- Actual type: [[a]] -> [[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
diff --git a/testsuite/tests/typecheck/should_fail/mc22.stderr b/testsuite/tests/typecheck/should_fail/mc22.stderr
index 943b7624f0..e4247abcc1 100644
--- a/testsuite/tests/typecheck/should_fail/mc22.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc22.stderr
@@ -1,9 +1,33 @@
+mc22.hs:8:11:
+ No instance for (Num (t0 [Char])) arising from a use of `+'
+ Possible fix: add an instance declaration for (Num (t0 [Char]))
+ In the expression: x + 1
+ In the expression:
+ [x + 1 | x <- ["Hello", "World"], then group using take 5]
+ In an equation for `foo':
+ foo = [x + 1 | x <- ["Hello", "World"], then group using take 5]
+
+mc22.hs:10:9:
+ No instance for (Functor t0) arising from a use of `fmap'
+ The type variable `t0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Functor ((,) a) -- Defined in `GHC.Base'
+ instance Functor ((->) r) -- Defined in `GHC.Base'
+ instance Functor IO -- Defined in `GHC.Base'
+ ...plus one other
+ In the expression: fmap
+ In a stmt of a monad comprehension: then group using take 5
+ In the expression:
+ [x + 1 | x <- ["Hello", "World"], then group using take 5]
+
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: [t0 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
diff --git a/testsuite/tests/typecheck/should_fail/mc23.stderr b/testsuite/tests/typecheck/should_fail/mc23.stderr
index ec632f8bdb..b3bad44e47 100644
--- a/testsuite/tests/typecheck/should_fail/mc23.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc23.stderr
@@ -1,8 +1,49 @@
+mc23.hs:9:15:
+ No instance for (Enum b0)
+ arising from the arithmetic sequence `1 .. 10'
+ The type variable `b0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Enum Double -- Defined in `GHC.Float'
+ instance Enum Float -- Defined in `GHC.Float'
+ instance Enum () -- Defined in `GHC.Enum'
+ ...plus five others
+ In a stmt of a monad comprehension: x <- [1 .. 10]
+ In a stmt of a monad comprehension: then take 5 by x
+ In the expression: [x | x <- [1 .. 10], then take 5 by x]
+
+mc23.hs:9:16:
+ No instance for (Num b0) arising from the literal `1'
+ The type variable `b0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus one other
+ In the expression: 1
+ In a stmt of a monad comprehension: x <- [1 .. 10]
+ In a stmt of a monad comprehension: then take 5 by x
+
+mc23.hs:9:24:
+ No instance for (Monad t0)
+ arising from a statement in a monad comprehension
+ The type variable `t0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Monad ((->) r) -- Defined in `GHC.Base'
+ instance Monad IO -- Defined in `GHC.Base'
+ instance Monad [] -- Defined in `GHC.Base'
+ In a stmt of a monad comprehension: then take 5 by x
+ In the expression: [x | x <- [1 .. 10], then take 5 by x]
+ In an equation for `z': z = [x | x <- [1 .. 10], then take 5 by x]
+
mc23.hs:9:29:
- Couldn't match expected type `a -> t0' with actual type `[a0]'
- Expected type: (a -> t0) -> [a] -> t1 a
+ 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
diff --git a/testsuite/tests/typecheck/should_fail/mc24.stderr b/testsuite/tests/typecheck/should_fail/mc24.stderr
index bee1592659..30d664a3fe 100644
--- a/testsuite/tests/typecheck/should_fail/mc24.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc24.stderr
@@ -1,8 +1,52 @@
+mc24.hs:9:14:
+ No instance for (Enum a1)
+ arising from the arithmetic sequence `1 .. 10'
+ The type variable `a1' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Enum Double -- Defined in `GHC.Float'
+ instance Enum Float -- Defined in `GHC.Float'
+ instance Enum () -- Defined in `GHC.Enum'
+ ...plus five others
+ In a stmt of a monad comprehension: x <- [1 .. 10]
+ In a stmt of a monad comprehension: then group by x using take 2
+ In the expression:
+ [length x | x <- [1 .. 10], then group by x using take 2]
+
+mc24.hs:9:15:
+ No instance for (Num a1) arising from the literal `1'
+ The type variable `a1' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus one other
+ In the expression: 1
+ In a stmt of a monad comprehension: x <- [1 .. 10]
+ In a stmt of a monad comprehension: then group by x using take 2
+
+mc24.hs:10:9:
+ No instance for (Monad t0)
+ arising from a statement in a monad comprehension
+ The type variable `t0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Monad ((->) r) -- Defined in `GHC.Base'
+ instance Monad IO -- Defined in `GHC.Base'
+ instance Monad [] -- Defined in `GHC.Base'
+ In a stmt of a monad comprehension: then group by x using take 2
+ In the expression:
+ [length x | x <- [1 .. 10], then group by x using take 2]
+ In an equation for `foo':
+ foo = [length x | x <- [1 .. 10], then group by x using take 2]
+
mc24.hs:10:31:
- Couldn't match expected type `a -> t0' with actual type `[a0]'
- Expected type: (a -> t0) -> [a] -> t1 (t2 a)
+ 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
diff --git a/testsuite/tests/typecheck/should_fail/mc25.stderr b/testsuite/tests/typecheck/should_fail/mc25.stderr
index 7016fad147..8caa47b3b4 100644
--- a/testsuite/tests/typecheck/should_fail/mc25.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc25.stderr
@@ -1,7 +1,48 @@
+mc25.hs:9:15:
+ No instance for (Enum t0)
+ arising from the arithmetic sequence `1 .. 10'
+ The type variable `t0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Enum Double -- Defined in `GHC.Float'
+ instance Enum Float -- Defined in `GHC.Float'
+ instance Enum () -- Defined in `GHC.Enum'
+ ...plus five others
+ In a stmt of a monad comprehension: x <- [1 .. 10]
+ 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:16:
+ No instance for (Num t0) arising from the literal `1'
+ The type variable `t0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus one other
+ In the expression: 1
+ In a stmt of a monad comprehension: x <- [1 .. 10]
+ In a stmt of a monad comprehension: then group by x using take
+
+mc25.hs:9:24:
+ No instance for (Functor t1) arising from a use of `fmap'
+ The type variable `t1' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Functor ((,) a) -- Defined in `GHC.Base'
+ instance Functor ((->) r) -- Defined in `GHC.Base'
+ instance Functor IO -- Defined in `GHC.Base'
+ ...plus one other
+ In the expression: fmap
+ In a stmt of a monad comprehension: then group by x using take
+ In the expression: [x | x <- [1 .. 10], then group by x using take]
+
mc25.hs:9:46:
- Couldn't match expected type `a -> t0' with actual type `Int'
- Expected type: (a -> t0) -> [a] -> t1 (t2 a)
- Actual type: Int -> [a0] -> [a0]
+ 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]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail001.stderr b/testsuite/tests/typecheck/should_fail/tcfail001.stderr
index 5fadcf6271..7c9b8ba27b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail001.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail001.stderr
@@ -1,5 +1,6 @@
tcfail001.hs:9:2:
+ Couldn't match expected type `[t0] -> [a0]' with actual type `[a]'
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/tcfail005.stderr b/testsuite/tests/typecheck/should_fail/tcfail005.stderr
index 8a158f5c8d..66e6fa9f69 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail005.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail005.stderr
@@ -1,5 +1,5 @@
tcfail005.hs:3:9:
- Couldn't match expected type `[t0]' with actual type `(t1, t2)'
+ Couldn't match expected type `[t0]' with actual type `(t1, Char)'
In the expression: (1, 'a')
In a pattern binding: (h : i) = (1, 'a')
diff --git a/testsuite/tests/typecheck/should_fail/tcfail008.stderr b/testsuite/tests/typecheck/should_fail/tcfail008.stderr
index 2d31ee6034..b50f77e05e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail008.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail008.stderr
@@ -1,4 +1,21 @@
+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)
+ Probable fix: give these definition(s) an explicit type signature
+ or use -XNoMonomorphismRestriction
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus one other
+ In the first argument of `(:)', namely `1'
+ In the expression: 1 : 2
+ In an equation for `o': o = 1 : 2
+
tcfail008.hs:3:7:
No instance for (Num [a0])
arising from the literal `2'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail010.stderr b/testsuite/tests/typecheck/should_fail/tcfail010.stderr
index 20a6d222a7..5f22a3a20e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail010.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail010.stderr
@@ -1,8 +1,7 @@
-
-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
+
+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/tcfail016.stderr b/testsuite/tests/typecheck/should_fail/tcfail016.stderr
index 6420918b37..6c1fa9ce62 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail016.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail016.stderr
@@ -1,7 +1,16 @@
tcfail016.hs:9:20:
- Couldn't match expected type `Expr t0'
- with actual type `AnnExpr t0'
+ Couldn't match type `(t0, Expr t0)' with `Expr t0'
+ Expected type: Expr t0
+ Actual type: AnnExpr t0
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
+ 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 4f09814afa..9ac3c7d64f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail017.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail017.stderr
@@ -4,7 +4,5 @@ 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 (C [a]) to the context of the instance declaration
- or add an instance declaration for (C [a])
+ 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 67ee509537..54df69888e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail018.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail018.stderr
@@ -1,7 +1,6 @@
tcfail018.hs:5:10:
- No instance for (Num [t0])
- arising from the literal `1'
+ 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/tcfail020.stderr b/testsuite/tests/typecheck/should_fail/tcfail020.stderr
index 3e0df9e42b..f15fd98084 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail020.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail020.stderr
@@ -4,7 +4,5 @@ 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 (A [a]) to the context of the instance declaration
- or add an instance declaration for (A [a])
+ Possible fix: add an instance declaration for (A [a])
In the instance declaration for `B [a]'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail028.stderr b/testsuite/tests/typecheck/should_fail/tcfail028.stderr
index e6d06db31d..6b573bfa07 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail028.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail028.stderr
@@ -1,7 +1,6 @@
-
-tcfail028.hs:4:17:
- `A a' is not applied to enough type arguments
- Expected kind `??', but `A a' has kind `k0 -> *'
- In the type `A a'
- In the definition of data constructor `B'
- In the data type declaration for `A'
+
+tcfail028.hs:4:17:
+ Expecting one more argument to `A a'
+ In the type `A a'
+ In the definition of data constructor `B'
+ In the data declaration for `A'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail034.stderr b/testsuite/tests/typecheck/should_fail/tcfail034.stderr
index db8e148eb9..38b04c10c6 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail034.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail034.stderr
@@ -3,7 +3,7 @@ tcfail034.hs:17:13:
Could not deduce (Integral a) arising from a use of `mod'
from the context (Num a, Eq a)
bound by the type signature for test :: (Num a, Eq a) => a -> Bool
- at tcfail034.hs:17:1-25
+ at tcfail034.hs:16:7-32
Possible fix:
add (Integral a) to the context of
the type signature for test :: (Num a, Eq a) => a -> Bool
diff --git a/testsuite/tests/typecheck/should_fail/tcfail036.stderr b/testsuite/tests/typecheck/should_fail/tcfail036.stderr
index 3f42189bbe..7cce75c5d2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail036.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail036.stderr
@@ -5,7 +5,5 @@ tcfail036.hs:6:10:
instance Num NUM -- Defined at tcfail036.hs:8:10
tcfail036.hs:9:13:
- `Num' is not applied to enough type arguments
- The first argument of `Eq' should have kind `*',
- but `Num' has kind `* -> Constraint'
+ Expecting one more argument to `Num'
In the instance declaration for `Eq Num'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail040.stderr b/testsuite/tests/typecheck/should_fail/tcfail040.stderr
index 19020b609d..8ee305f03f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail040.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail040.stderr
@@ -1,8 +1,10 @@
-
-tcfail040.hs:19:5:
- Ambiguous type variable `a0' in the constraint:
- (ORD a0) arising from a use of `<<'
- Probable fix: add a type signature that fixes these type variable(s)
- In the first argument of `(===)', namely `(<<)'
- In the expression: (<<) === (<<)
- In an equation for `f': f = (<<) === (<<)
+
+tcfail040.hs:19:5:
+ No instance for (ORD a0) arising from a use of `<<'
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there is a potential instance available:
+ instance ORD (a -> b) -- Defined at tcfail040.hs:17:10
+ In the first argument of `(===)', namely `(<<)'
+ In the expression: (<<) === (<<)
+ In an equation for `f': f = (<<) === (<<)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail043.stderr b/testsuite/tests/typecheck/should_fail/tcfail043.stderr
index 7cd3faf53e..3e52e69c56 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail043.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail043.stderr
@@ -1,12 +1,13 @@
tcfail043.hs:38:17:
- Ambiguous type variable `a0' in the constraints:
- (Ord_ a0) arising from a use of `gt' at tcfail043.hs:38:17-18
- (Eq_ a0) arising from a use of `eq' at tcfail043.hs:40:25-26
+ 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)
Probable fix: give these definition(s) an explicit type signature
or use -XNoMonomorphismRestriction
+ Note: there is a potential instance available:
+ instance Ord_ Int -- Defined at tcfail043.hs:34:10
In the expression: gt (hd bs) a
In the expression:
if gt (hd bs) a then
@@ -19,3 +20,21 @@ tcfail043.hs:38:17:
False
else
if eq a (hd bs) then True else search a (tl bs)
+
+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)
+ Probable fix: give these definition(s) an explicit type signature
+ or use -XNoMonomorphismRestriction
+ 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
+ In the expression: eq a (hd bs)
+ In the expression: if eq a (hd bs) then True else search a (tl bs)
+ In the expression:
+ if gt (hd bs) a then
+ False
+ else
+ if eq a (hd bs) then True else search a (tl bs)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail057.stderr b/testsuite/tests/typecheck/should_fail/tcfail057.stderr
index 4c815b6bb1..da5a480f8c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail057.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail057.stderr
@@ -1,5 +1,4 @@
tcfail057.hs:5:7:
Predicate `RealFrac a' used as a type
- Expected kind `??', but `RealFrac a' has kind `Constraint'
In the type signature for `f': f :: (RealFrac a) -> a -> a
diff --git a/testsuite/tests/typecheck/should_fail/tcfail058.stderr b/testsuite/tests/typecheck/should_fail/tcfail058.stderr
index 46ce26c174..6214d27498 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail058.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail058.stderr
@@ -1,5 +1,4 @@
tcfail058.hs:6:7:
- `Array a' is not applied to enough type arguments
- Expected kind `Constraint', but `Array a' has kind `* -> *'
+ Expecting one more argument to `Array a'
In the type signature for `f': f :: Array a => a -> b
diff --git a/testsuite/tests/typecheck/should_fail/tcfail063.stderr b/testsuite/tests/typecheck/should_fail/tcfail063.stderr
index 8111ae8485..62e3f17ca8 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail063.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail063.stderr
@@ -1,5 +1,4 @@
tcfail063.hs:6:9:
- `Num' is not applied to enough type arguments
- Expected kind `Constraint', but `Num' has kind `* -> Constraint'
+ Expecting one more argument to `Num'
In the type signature for `moby': moby :: Num => Int -> a -> Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail065.stderr b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
index da855d3e6f..fbe7e545c1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail065.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
@@ -1,12 +1,11 @@
-tcfail065.hs:29:18:
- Couldn't match type `x1' with `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
- `x' is a rigid type variable bound by
- the instance declaration at tcfail065.hs:28:18
- Expected type: X x1
- Actual type: X x
- In the return type of a call of `X'
+ 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/tcfail067.stderr b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
index 039a4e61f9..9e47a0bebc 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail067.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
@@ -1,17 +1,21 @@
-tcfail067.hs:1:14:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+tcfail067.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
tcfail067.hs:12:16:
- No instance for (Ord a)
- arising from a use of `SubRange'
+ No instance for (Ord a) arising from a use of `SubRange'
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for subRangeValue :: SubRange a -> a
In the pattern: SubRange (lower, upper) value
In an equation for `subRangeValue':
subRangeValue (SubRange (lower, upper) value) = value
tcfail067.hs:15:11:
- No instance for (Ord a)
- arising from a use of `SubRange'
+ No instance for (Ord a) arising from a use of `SubRange'
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for subRange :: SubRange a -> (a, a)
In the pattern: SubRange r value
In an equation for `subRange': subRange (SubRange r value) = r
@@ -20,7 +24,7 @@ tcfail067.hs:46:12:
from the context (Show a)
bound by the type signature for
showRange :: Show a => SubRange a -> String
- at tcfail067.hs:(46,1)-(47,58)
+ at tcfail067.hs:45:14-43
Possible fix:
add (Ord a) to the context of
the type signature for showRange :: Show a => SubRange a -> String
@@ -30,12 +34,11 @@ tcfail067.hs:46:12:
= show value ++ " :" ++ show lower ++ ".." ++ show upper
tcfail067.hs:61:12:
- Could not deduce (Ord a, Show a)
- arising from a use of `numSubRangeNegate'
+ Could not deduce (Show a) arising from a use of `numSubRangeNegate'
from the context (Num a)
bound by the instance declaration at tcfail067.hs:60:10-34
Possible fix:
- add (Ord a, Show a) to the context of the instance declaration
+ add (Show a) to the context of the instance declaration
In the expression: numSubRangeNegate
In an equation for `negate': negate = numSubRangeNegate
In the instance declaration for `Num (SubRange a)'
@@ -59,7 +62,7 @@ tcfail067.hs:74:5:
bound by the type signature for
numSubRangeBinOp :: Num a =>
(a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
- at tcfail067.hs:(73,1)-(76,53)
+ at tcfail067.hs:(71,21)-(72,58)
Possible fix:
add (Ord a) to the context of
the type signature for
diff --git a/testsuite/tests/typecheck/should_fail/tcfail068.stderr b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
index 52adc6c582..bf6e1448bd 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail068.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
@@ -1,43 +1,46 @@
tcfail068.hs:14:9:
- Could not deduce (s ~ s1)
+ 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:(12,1)-(14,31)
- `s' is a rigid type variable bound by
- the type signature for
- itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
- at tcfail068.hs:12:1
+ 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 s (STArray s (Int, Int) 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:20:9:
+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:(17,1)-(21,19)
+ 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:17:1
+ 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: GHC.ST.ST s1 ()
- Actual type: GHC.ST.ST s ()
- In the return type of a call of `writeSTArray'
- In the first argument of `(>>)', namely
- `writeSTArray arr i (f val)'
+ 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)
@@ -45,12 +48,12 @@ tcfail068.hs:24:35:
bound by the type signature for
itrap :: Constructed a =>
((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:(24,1)-(32,41)
+ 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:24:1
+ 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
@@ -58,6 +61,7 @@ tcfail068.hs:24:35:
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)
@@ -71,7 +75,7 @@ tcfail068.hs:36:46:
-> c
-> IndTree s b
-> (c, IndTree s b)
- at tcfail068.hs:(36,1)-(45,66)
+ at tcfail068.hs:(34,15)-(35,62)
`s' is a rigid type variable bound by
the type signature for
itrapstate :: Constructed b =>
@@ -82,7 +86,7 @@ tcfail068.hs:36:46:
-> c
-> IndTree s b
-> (c, IndTree s b)
- at tcfail068.hs:36:1
+ 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
@@ -90,3 +94,4 @@ tcfail068.hs:36:46:
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)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail070.stderr b/testsuite/tests/typecheck/should_fail/tcfail070.stderr
index 31dd66e77f..76e9feb515 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail070.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail070.stderr
@@ -1,5 +1,5 @@
-
-tcfail070.hs:15:15:
- `[Int]' is applied to too many type arguments
- In the type `[Int] Bool'
- In the type synonym declaration for `State'
+
+tcfail070.hs:15:15:
+ `[Int]' is applied to too many type arguments
+ In the type `[Int] Bool'
+ In the type declaration for `State'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
index 469e75849a..b56f162919 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
@@ -1,14 +1,17 @@
tcfail072.hs:23:13:
- Ambiguous type variable `p0' in the constraint:
- (Ord p0) arising from a use of `g'
- Probable fix: add a type signature that fixes these type variable(s)
- In the expression: g A
- In an equation for `g': g (B _ _) = g A
-
-tcfail072.hs:23:13:
- Ambiguous type variable `q0' in the constraint:
- (Ord q0) arising from a use of `g'
- Probable fix: add a type signature that fixes these type variable(s)
+ Could not deduce (Ord q0) arising from a use of `g'
+ from the context (Ord p, Ord q)
+ bound by the type signature for
+ g :: (Ord p, Ord q) => AB p q -> Bool
+ at tcfail072.hs:22:6-38
+ The type variable `q0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Ord () -- Defined in `GHC.Classes'
+ instance (Ord a, Ord b) => Ord (a, b) -- Defined in `GHC.Classes'
+ instance (Ord a, Ord b, Ord c) => Ord (a, b, c)
+ -- Defined in `GHC.Classes'
+ ...plus 23 others
In the expression: g A
In an equation for `g': g (B _ _) = g A
diff --git a/testsuite/tests/typecheck/should_fail/tcfail076.stderr b/testsuite/tests/typecheck/should_fail/tcfail076.stderr
index 9c380de958..4ca4cf403b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail076.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail076.stderr
@@ -11,3 +11,4 @@ tcfail076.hs:18:82:
Actual type: m res
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/tcfail079.stderr b/testsuite/tests/typecheck/should_fail/tcfail079.stderr
index 149f9b2171..a7b9b7cb3f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail079.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail079.stderr
@@ -1,7 +1,6 @@
tcfail079.hs:9:27:
Expecting a lifted type, but `Int#' is unlifted
- Expected kind `*', but `Int#' has kind `#'
In the type `Int#'
In the definition of data constructor `Unboxed'
In the newtype declaration for `Unboxed'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail080.hs b/testsuite/tests/typecheck/should_fail/tcfail080.hs
index b2a62cea54..fa77ad8242 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail080.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail080.hs
@@ -11,7 +11,9 @@
-- Of course, it'd be hard to fill in the "..." in this particular
-- case, but that relies on observations about the form of the types
-- of the class methods, surely beyond what a compiler should do.
--- That's why GHC accepts it
+--
+-- Still, the type is ambiguous because there's nothing to fix 'c'
+
module ShouldFail where
diff --git a/testsuite/tests/typecheck/should_fail/tcfail080.stderr b/testsuite/tests/typecheck/should_fail/tcfail080.stderr
index e69de29bb2..520078682b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail080.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail080.stderr
@@ -0,0 +1,14 @@
+
+tcfail080.hs:27:1:
+ Could not deduce (Collection c0 a)
+ arising from the ambiguity check for `q'
+ from the context (Collection c a)
+ bound by the inferred type for `q': Collection c a => a -> Bool
+ at tcfail080.hs:27:1-27
+ The type variable `c0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ When checking that `q'
+ has the inferred type `forall (c :: * -> *) a.
+ Collection c a =>
+ a -> Bool'
+ Probable cause: the inferred type is ambiguous
diff --git a/testsuite/tests/typecheck/should_fail/tcfail086.stderr b/testsuite/tests/typecheck/should_fail/tcfail086.stderr
index 4b221839ea..1aa420928d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail086.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail086.stderr
@@ -1,6 +1,6 @@
-
-tcfail086.hs:6:38:
- Can't make a derived instance of `Eq Ex':
- Constructor `Ex' must have a Haskell-98 type
- Possible fix: use a standalone deriving declaration instead
- In the data type declaration for `Ex'
+
+tcfail086.hs:6:38:
+ Can't make a derived instance of `Eq Ex':
+ Constructor `Ex' must have a Haskell-98 type
+ Possible fix: use a standalone deriving declaration instead
+ In the data declaration for `Ex'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail087.stderr b/testsuite/tests/typecheck/should_fail/tcfail087.stderr
index b9e9d2fa6a..3c244ddc8b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail087.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail087.stderr
@@ -1,7 +1,7 @@
-
-tcfail087.hs:6:14:
- Kind mis-match
- Expected kind `??', but `(# Int, Int #)' has kind `(#)'
- In the type `(# Int, Int #)'
- In the definition of data constructor `Ex'
- In the data type declaration for `Ex'
+
+tcfail087.hs:6:14:
+ Kind mis-match
+ Expected kind `ArgKind', but `(# Int, Int #)' has kind `(#)'
+ In the type `(# Int, Int #)'
+ In the definition of data constructor `Ex'
+ In the data declaration for `Ex'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail094.stderr b/testsuite/tests/typecheck/should_fail/tcfail094.stderr
index 8cd67b632b..c5dcc172d5 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail094.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail094.stderr
@@ -1,2 +1,3 @@
-tcfail094.hs:7:14: parse error on input `1'
+tcfail094.hs:7:14:
+ Illegal literal in type (use -XDataKinds to enable): 1
diff --git a/testsuite/tests/typecheck/should_fail/tcfail097.stderr b/testsuite/tests/typecheck/should_fail/tcfail097.stderr
index 967b172bb9..2fabae4b40 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail097.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail097.stderr
@@ -1,6 +1,6 @@
-
-tcfail097.hs:5:1:
- Ambiguous constraint `Eq a'
- At least one of the forall'd type variables mentioned by the constraint
- must be reachable from the type after the '=>'
- In the type signature for `f': f :: Eq a => Int -> Int
+
+tcfail097.hs:5:6:
+ Ambiguous constraint `Eq a'
+ At least one of the forall'd type variables mentioned by the constraint
+ must be reachable from the type after the '=>'
+ In the type signature for `f': f :: Eq a => Int -> Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail099.stderr b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
index f97c5a1161..aa7eb99197 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail099.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
@@ -1,13 +1,13 @@
tcfail099.hs:9:20:
- Couldn't match type `t' with `a'
- `t' is a rigid type variable bound by
- the inferred type of call :: DS -> t -> Int at tcfail099.hs:9:1
+ Couldn't match expected type `a' with actual type `t'
`a' is a rigid type variable bound by
a pattern with constructor
C :: forall a. (a -> Int) -> DS,
in an equation for `call'
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
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/tcfail100.stderr b/testsuite/tests/typecheck/should_fail/tcfail100.stderr
index 36ee6f8218..885c8220b9 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail100.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail100.stderr
@@ -1,4 +1,4 @@
-
-tcfail100.hs:7:1:
- Type synonym `A' should have 1 argument, but has been given none
- In the type synonym declaration for `B'
+
+tcfail100.hs:7:1:
+ Type synonym `A' should have 1 argument, but has been given none
+ In the type declaration for `B'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail101.stderr b/testsuite/tests/typecheck/should_fail/tcfail101.stderr
index 0d82b50750..5cca6de0a3 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail101.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail101.stderr
@@ -1,4 +1,4 @@
-tcfail101.hs:9:1:
+tcfail101.hs:9:6:
Type synonym `A' should have 1 argument, but has been given none
In the type signature for `f': f :: T A
diff --git a/testsuite/tests/typecheck/should_fail/tcfail102.stderr b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
index 792c941081..4c651bf7d4 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail102.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
@@ -1,18 +1,14 @@
-
-tcfail102.hs:1:14:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail102.hs:9:15:
- Could not deduce (Integral (Ratio a)) arising from a use of `p'
- from the context (Integral a)
- bound by the type signature for
- f :: Integral a => P (Ratio a) -> P (Ratio a)
- at tcfail102.hs:9:1-19
- Possible fix:
- add (Integral (Ratio a)) to the context of
- the type signature for
- f :: Integral a => P (Ratio a) -> P (Ratio a)
- or 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}
+
+tcfail102.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail102.hs:9:15:
+ Could not deduce (Integral (Ratio a)) arising from a use of `p'
+ from the context (Integral a)
+ 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 17fea5cada..134f36f193 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail103.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
@@ -1,11 +1,12 @@
-tcfail103.hs:15:13:
+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:11:1
+ 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:15:9
- Expected type: ST s Int
- Actual type: ST t Int
- In the return type of a call of `readSTRef'
+ 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
diff --git a/testsuite/tests/typecheck/should_fail/tcfail104.stderr b/testsuite/tests/typecheck/should_fail/tcfail104.stderr
index 8bd4608bde..5e6fc3bb1f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail104.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail104.stderr
@@ -1,6 +1,6 @@
tcfail104.hs:16:19:
- Couldn't match expected type `a0 -> a0'
+ Couldn't match expected type `Char -> Char'
with actual type `forall a. a -> a'
In the expression: x
In the expression: (\ x -> x)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail107.stderr b/testsuite/tests/typecheck/should_fail/tcfail107.stderr
index eae3610c1d..92a89b7544 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail107.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail107.stderr
@@ -1,5 +1,5 @@
-tcfail107.hs:13:1:
+tcfail107.hs:13:9:
Type synonym `Const' should have 2 arguments, but has been given 1
In the type signature for `test':
test :: Thing (Const Int) -> Thing (Const Int)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail110.stderr b/testsuite/tests/typecheck/should_fail/tcfail110.stderr
index 9e001cb44e..735ef3c823 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail110.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail110.stderr
@@ -1,6 +1,5 @@
tcfail110.hs:8:30:
- `Foo a' is not applied to enough type arguments
- Expected kind `??', but `Foo a' has kind `* -> *'
+ Expecting one more argument to `Foo a'
In the type signature for `bar':
bar :: String -> (forall a. Foo a) -> IO ()
diff --git a/testsuite/tests/typecheck/should_fail/tcfail113.stderr b/testsuite/tests/typecheck/should_fail/tcfail113.stderr
index d4c9208243..68e63c416b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail113.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail113.stderr
@@ -1,18 +1,14 @@
tcfail113.hs:12:7:
- `Maybe' is not applied to enough type arguments
- Expected kind `*', but `Maybe' has kind `* -> *'
- In the type signature for `f':
- f :: [Maybe]
+ Expecting one more argument to `Maybe'
+ In the type signature for `f': f :: [Maybe]
tcfail113.hs:15:8:
Kind mis-match
The first argument of `T' should have kind `* -> *',
but `Int' has kind `*'
- In the type signature for `g':
- g :: T Int
+ In the type signature for `g': g :: T Int
tcfail113.hs:18:6:
`Int' is applied to too many type arguments
- In the type signature for `h':
- h :: Int Int
+ In the type signature for `h': h :: Int Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail115.stderr b/testsuite/tests/typecheck/should_fail/tcfail115.stderr
index 00352afd9e..89f5178c87 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail115.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail115.stderr
@@ -1,8 +1,8 @@
tcfail115.hs:9:24:
- Couldn't match kind `??' against `(#)'
+ Couldn't match kind `ArgKind' against `(#)'
Kind incompatibility when matching types:
- t0 :: ??
+ t0 :: ArgKind
(# Int, Int #) :: (#)
In the expression: (r :: (# Int, Int #))
In a case alternative: r -> (r :: (# Int, Int #))
diff --git a/testsuite/tests/typecheck/should_fail/tcfail117.stderr b/testsuite/tests/typecheck/should_fail/tcfail117.stderr
index 2bc3d7fd63..c7be9199c5 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail117.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail117.stderr
@@ -1,13 +1,13 @@
-
-tcfail117.hs:5:32:
- Can't make a derived instance of `Enum N1':
- `N1' must be an enumeration type
- (an enumeration consists of one or more nullary, non-GADT constructors)
- Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension
- In the newtype declaration for `N1'
-
-tcfail117.hs:6:32:
- Can't make a derived instance of `Enum N2':
- `N2' must be an enumeration type
- (an enumeration consists of one or more nullary, non-GADT constructors)
- In the data type declaration for `N2'
+
+tcfail117.hs:5:32:
+ Can't make a derived instance of `Enum N1':
+ `N1' must be an enumeration type
+ (an enumeration consists of one or more nullary, non-GADT constructors)
+ Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension
+ In the newtype declaration for `N1'
+
+tcfail117.hs:6:32:
+ Can't make a derived instance of `Enum N2':
+ `N2' must be an enumeration type
+ (an enumeration consists of one or more nullary, non-GADT constructors)
+ In the data declaration for `N2'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail125.stderr b/testsuite/tests/typecheck/should_fail/tcfail125.stderr
index 988540dad5..addd093bff 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail125.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail125.stderr
@@ -1,9 +1,11 @@
-tcfail125.hs:1:14:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+tcfail125.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
tcfail125.hs:11:4:
- No instance for (Show a)
- arising from a use of `LiftObs'
+ No instance for (Show a) arising from a use of `LiftObs'
+ Possible fix:
+ add (Show a) to the context of
+ the type signature for f :: Obs a -> String
In the pattern: LiftObs _ _
In an equation for `f': f (LiftObs _ _) = "yes"
diff --git a/testsuite/tests/typecheck/should_fail/tcfail127.stderr b/testsuite/tests/typecheck/should_fail/tcfail127.stderr
index 8fa64fb204..021120314f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail127.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail127.stderr
@@ -1,5 +1,5 @@
-
-tcfail127.hs:3:1:
- Illegal polymorphic or qualified type: Num a => a -> a
- Perhaps you intended to use -XImpredicativeTypes
- In the type signature for `foo': foo :: IO (Num a => a -> a)
+
+tcfail127.hs:3:8:
+ Illegal polymorphic or qualified type: Num a => a -> a
+ Perhaps you intended to use -XImpredicativeTypes
+ In the type signature for `foo': foo :: IO (Num a => a -> a)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail128.stderr b/testsuite/tests/typecheck/should_fail/tcfail128.stderr
index a3c99a9548..0834cc2fbd 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail128.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail128.stderr
@@ -2,6 +2,11 @@
tcfail128.hs:18:16:
No instance for (Data.Array.Base.MArray b0 FlatVector IO)
arising from a use of `thaw'
+ The type variable `b0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ 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)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail129.stderr b/testsuite/tests/typecheck/should_fail/tcfail129.stderr
index f9ee8a567d..f6ee765ce4 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail129.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail129.stderr
@@ -1,11 +1,11 @@
-tcfail129.hs:12:8:
+tcfail129.hs:12:21:
Type synonym `Foo' should have 1 argument, but has been given none
In an expression type signature: Bar Foo
In the expression: undefined :: Bar Foo
In an equation for `blah': blah = undefined :: Bar Foo
-tcfail129.hs:17:9:
+tcfail129.hs:17:22:
Type synonym `Foo1' should have 1 argument, but has been given none
In an expression type signature: Bar1 Foo1
In the expression: undefined :: Bar1 Foo1
diff --git a/testsuite/tests/typecheck/should_fail/tcfail131.stderr b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
index 548e063929..785801a9a4 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail131.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
@@ -3,9 +3,9 @@ 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:7:3-13
+ 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:7:3
+ 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
diff --git a/testsuite/tests/typecheck/should_fail/tcfail132.stderr b/testsuite/tests/typecheck/should_fail/tcfail132.stderr
index 14e1f8d98c..bfe7fc3ab7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail132.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail132.stderr
@@ -1,7 +1,7 @@
-
-tcfail132.hs:17:37:
- Kind mis-match
- The first argument of `T' should have kind `* -> * -> * -> *',
- but `Object f' f t' has kind `* -> * -> *'
- In the type `T (Object f' f t) (DUnit t)'
- In the type synonym declaration for `LiftObject'
+
+tcfail132.hs:17:37:
+ Kind mis-match
+ The first argument of `T' should have kind `* -> * -> * -> *',
+ but `Object f' f t' has kind `* -> * -> *'
+ In the type `T (Object f' f t) (DUnit t)'
+ In the type declaration for `LiftObject'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail133.stderr b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
index 2808159950..a0c2ca4ec0 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail133.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
@@ -1,6 +1,22 @@
-tcfail133.hs:2:61:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+tcfail133.hs:2:61: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail133.hs:68:7:
+ No instance for (Show a0)
+ arising from a use of `show'
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Show Zero -- Defined at tcfail133.hs:8:29
+ instance Show One -- Defined at tcfail133.hs:9:28
+ instance (Show a, Show b, Number a, Digit b) => Show (a :@ b)
+ -- Defined at tcfail133.hs:11:54
+ ...plus 27 others
+ In the expression: show
+ In the expression: show $ add (One :@ Zero) (One :@ One)
+ In an equation for `foo':
+ foo = show $ add (One :@ Zero) (One :@ One)
tcfail133.hs:68:14:
No instance for (AddDigit (Zero :@ (One :@ One)) One a0)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail134.stderr b/testsuite/tests/typecheck/should_fail/tcfail134.stderr
index ef8b8b1511..9634300266 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail134.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail134.stderr
@@ -1,6 +1,5 @@
tcfail134.hs:5:33:
- `XML' is not applied to enough type arguments
- Expected kind `?', but `XML' has kind `* -> Constraint'
+ Expecting one more argument to `XML'
In the type `a -> XML'
In the class declaration for `XML'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail135.stderr b/testsuite/tests/typecheck/should_fail/tcfail135.stderr
index 37274283ed..4db48083f9 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail135.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail135.stderr
@@ -1,6 +1,5 @@
tcfail135.hs:6:23:
- `f' is not applied to enough type arguments
- Expected kind `?', but `f' has kind `k0 -> *'
+ Expecting one more argument to `f'
In the type `f a -> f'
In the class declaration for `Foo'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail136.stderr b/testsuite/tests/typecheck/should_fail/tcfail136.stderr
index 229cd1ff41..c1071a11ec 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail136.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail136.stderr
@@ -1,7 +1,6 @@
-
-tcfail136.hs:9:35:
- `SymDict' is not applied to enough type arguments
- Expected kind `??', but `SymDict' has kind `* -> *'
- In the type `SymDict'
- In the definition of data constructor `SymTable'
- In the data type declaration for `SymTable'
+
+tcfail136.hs:9:35:
+ Expecting one more argument to `SymDict'
+ In the type `SymDict'
+ In the definition of data constructor `SymTable'
+ In the data declaration for `SymTable'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail140.stderr b/testsuite/tests/typecheck/should_fail/tcfail140.stderr
index bc888d2309..f24a2a7f82 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail140.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail140.stderr
@@ -1,22 +1,24 @@
tcfail140.hs:10:7:
+ Couldn't match expected type `a0 -> t0' with actual type `Int'
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'
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'
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
- In an equation for `bot': bot xs = map (3 `f`) xs
tcfail140.hs:16:8:
Constructor `Just' should have 1 argument, but has been given none
@@ -25,5 +27,6 @@ tcfail140.hs:16:8:
In the expression: ((\ Just x -> x) :: Maybe a -> a) (Just 1)
tcfail140.hs:19:1:
+ Couldn't match expected type `t0 -> Bool' with actual type `Int'
The equation(s) for `g' have two arguments,
but its type `Int -> Int' has only one
diff --git a/testsuite/tests/typecheck/should_fail/tcfail142.stderr b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
index cd0161658f..635a670495 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail142.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
@@ -1,8 +1,7 @@
tcfail142.hs:21:12:
- Ambiguous type variables `a0', `r0' in the constraint:
- (Bar a0 r0) arising from a use of `bar'
- Probable fix: add a type signature that fixes these type variable(s)
+ No instance for (Bar a0 r0)
+ arising from a use of `bar'
In the first argument of `foo', namely `bar'
In the expression: foo bar
In an equation for `test': test = foo bar
diff --git a/testsuite/tests/typecheck/should_fail/tcfail143.stderr b/testsuite/tests/typecheck/should_fail/tcfail143.stderr
index 2c3857e0ee..846f8c0252 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail143.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail143.stderr
@@ -1,22 +1,11 @@
-
-tcfail143.hs:29:9:
- Couldn't match type `S Z' with `Z'
- When using functional dependencies to combine
- MinMax a Z Z a,
- arising from the dependency `a b -> c d'
- in the instance declaration at tcfail143.hs:11:10
- MinMax (S Z) Z Z Z,
- arising from a use of `extend' at tcfail143.hs:29:9-16
- In the expression: n1 `extend` n0
- In an equation for `t2': t2 = n1 `extend` n0
-
-tcfail143.hs:29:9:
- Couldn't match type `Z' with `S Z'
- When using functional dependencies to combine
- MinMax Z Z Z Z,
- arising from the dependency `b c d -> a'
- in the instance declaration at tcfail143.hs:10:10
- MinMax (S Z) Z Z Z,
- arising from a use of `extend' at tcfail143.hs:29:9-16
- In the expression: n1 `extend` n0
- In an equation for `t2': t2 = n1 `extend` n0
+
+tcfail143.hs:29:9:
+ Couldn't match type `S Z' with `Z'
+ When using functional dependencies to combine
+ MinMax a Z Z a,
+ arising from the dependency `a b -> c d'
+ in the instance declaration at tcfail143.hs:11:10
+ MinMax (S Z) Z Z Z,
+ arising from a use of `extend' at tcfail143.hs:29:9-16
+ In the expression: n1 `extend` n0
+ In an equation for `t2': t2 = n1 `extend` n0
diff --git a/testsuite/tests/typecheck/should_fail/tcfail146.stderr b/testsuite/tests/typecheck/should_fail/tcfail146.stderr
index e66dc94a76..433327a089 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail146.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail146.stderr
@@ -1,7 +1,6 @@
-
-tcfail146.hs:7:22:
- Predicate `SClass a' used as a type
- Expected kind `??', but `SClass a' has kind `Constraint'
- In the type `SClass a'
- In the definition of data constructor `SCon'
- In the data type declaration for `SData'
+
+tcfail146.hs:7:22:
+ Predicate `SClass a' used as a type
+ In the type `SClass a'
+ In the definition of data constructor `SCon'
+ In the data declaration for `SData'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail147.stderr b/testsuite/tests/typecheck/should_fail/tcfail147.stderr
index 51c32ad8a2..f5aa074a80 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail147.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail147.stderr
@@ -1,7 +1,6 @@
-
-tcfail147.hs:7:19:
- `XClass' is not applied to enough type arguments
- Expected kind `??', but `XClass' has kind `k0 -> Constraint'
- In the type `XClass'
- In the definition of data constructor `XCon'
- In the data type declaration for `XData'
+
+tcfail147.hs:7:19:
+ Expecting one more argument to `XClass'
+ In the type `XClass'
+ In the definition of data constructor `XCon'
+ In the data declaration for `XData'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail148.stderr b/testsuite/tests/typecheck/should_fail/tcfail148.stderr
index 670f440314..252ffec3c0 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail148.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail148.stderr
@@ -1,7 +1,6 @@
-
-tcfail148.hs:5:28:
- `List' is not applied to enough type arguments
- Expected kind `??', but `List' has kind `* -> *'
- In the type `List'
- In the definition of data constructor `Cons'
- In the data type declaration for `List'
+
+tcfail148.hs:5:28:
+ Expecting one more argument to `List'
+ In the type `List'
+ In the definition of data constructor `Cons'
+ In the data declaration for `List'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail151.stderr b/testsuite/tests/typecheck/should_fail/tcfail151.stderr
index 857316de61..c7dce325a0 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail151.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail151.stderr
@@ -1,8 +1,7 @@
-
-tcfail151.hs:1:14:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail151.hs:8:6:
- `Name a' is not applied to enough type arguments
- Expected kind `Constraint', but `Name a' has kind `* -> Constraint'
- In the data type declaration for `Exp'
+
+tcfail151.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail151.hs:8:6:
+ Expecting one more argument to `Name a'
+ In the data declaration for `Exp'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail152.hs b/testsuite/tests/typecheck/should_fail/tcfail152.hs
index 3ebb6fe0f6..5b3ec3f789 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail152.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail152.hs
@@ -1,10 +1,10 @@
{-# LANGUAGE ExistentialQuantification #-}
-
--- This test made Hugs fail (Oct 05) because the constraint
--- from the 'toInteger' call escaped from the pattern match
-
-module ShouldFail where
-
-data T = forall a. C a
-
-test (C x) = toInteger x
+
+-- This test made Hugs fail (Oct 05) because the constraint
+-- from the 'toInteger' call escaped from the pattern match
+
+module ShouldFail where
+
+data T = forall a. C a
+
+test (C x) = toInteger x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail152.stderr b/testsuite/tests/typecheck/should_fail/tcfail152.stderr
index 5ae2f52f00..24a872c9ee 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail152.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail152.stderr
@@ -1,6 +1,7 @@
tcfail152.hs:10:14:
- No instance for (Integral a)
- arising from a use of `toInteger'
+ No instance for (Integral a) arising from a use of `toInteger'
+ Possible fix:
+ add (Integral a) to the context of the data constructor `C'
In the expression: toInteger x
In an equation for `test': test (C x) = toInteger x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail153.stderr b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
index 0b40df47d1..200df0b6f6 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail153.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
@@ -1,9 +1,11 @@
-tcfail153.hs:6:9:
+tcfail153.hs:6:7:
Couldn't match type `a' with `Bool'
`a' is a rigid type variable bound by
- the type signature for f :: a -> [a] at tcfail153.hs:6:1
- In the first argument of `g', namely `x'
+ the type signature for f :: a -> [a] at tcfail153.hs:5:6
+ Expected type: [a]
+ Actual type: [Bool]
+ In the return type of a call of `g'
In the expression: g x
In an equation for `f':
f x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail155.stderr b/testsuite/tests/typecheck/should_fail/tcfail155.stderr
index fcc1133d4d..1b5f1f3b0e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail155.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail155.stderr
@@ -1,6 +1,6 @@
-
-tcfail155.hs:8:6:
- Data constructor `P' returns type `L2'
- instead of an instance of its parent type `T a'
- In the definition of data constructor `P'
- In the data type declaration for `T'
+
+tcfail155.hs:8:6:
+ Data constructor `P' returns type `L2'
+ instead of an instance of its parent type `T a'
+ In the definition of data constructor `P'
+ In the data declaration for `T'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail158.stderr b/testsuite/tests/typecheck/should_fail/tcfail158.stderr
index b9c3a7dbca..a9e9eebf76 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail158.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail158.stderr
@@ -1,6 +1,4 @@
tcfail158.hs:14:19:
- `Val v' is not applied to enough type arguments
- Expected kind `*', but `Val v' has kind `* -> *'
- In the type signature for `bar':
- bar :: forall v. Val v
+ Expecting one more argument to `Val v'
+ In the type signature for `bar': bar :: forall v. Val v
diff --git a/testsuite/tests/typecheck/should_fail/tcfail161.stderr b/testsuite/tests/typecheck/should_fail/tcfail161.stderr
index 0b04d8ef02..09f6b52404 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail161.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail161.stderr
@@ -1,6 +1,4 @@
tcfail161.hs:5:7:
- `Maybe' is not applied to enough type arguments
- Expected kind `*', but `Maybe' has kind `* -> *'
- In the type signature for `f':
- f :: [Maybe]
+ Expecting one more argument to `Maybe'
+ In the type signature for `f': f :: [Maybe]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail162.stderr b/testsuite/tests/typecheck/should_fail/tcfail162.stderr
index fcc1fb5665..de2b3129b9 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail162.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail162.stderr
@@ -1,7 +1,6 @@
-
-tcfail162.hs:10:33:
- `ForeignPtr' is not applied to enough type arguments
- Expected kind `??', but `ForeignPtr' has kind `* -> *'
- In the type `{-# UNPACK #-} !ForeignPtr'
- In the definition of data constructor `Foo'
- In the data type declaration for `Foo'
+
+tcfail162.hs:10:33:
+ Expecting one more argument to `ForeignPtr'
+ In the type `ForeignPtr'
+ In the definition of data constructor `Foo'
+ In the data declaration for `Foo'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail168.hs b/testsuite/tests/typecheck/should_fail/tcfail168.hs
index 94a78a93b0..b6762d888d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail168.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail168.hs
@@ -63,4 +63,3 @@ foo = do
putChar 'a'
putChar 'a'
putChar 'a'
-
diff --git a/testsuite/tests/typecheck/should_fail/tcfail168.stderr b/testsuite/tests/typecheck/should_fail/tcfail168.stderr
index f16f65bdb1..a6a5064562 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail168.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail168.stderr
@@ -1,12 +1,17 @@
-tcfail168.hs:8:11:
- Couldn't match expected type `Char -> a0' with actual type `IO ()'
- In the return type of a call of `putChar'
- Probable cause: `putChar' is applied to too many arguments
- In a stmt of a 'do' block: putChar 'a'
+tcfail168.hs:7:11:
+ Couldn't match expected type `IO a0'
+ with actual type `Char -> IO ()'
+ In a stmt of a 'do' block: putChar
In the expression:
do { putChar;
putChar 'a';
putChar 'a';
putChar 'a';
.... }
+ In an equation for `foo':
+ foo
+ = do { putChar;
+ putChar 'a';
+ putChar 'a';
+ .... }
diff --git a/testsuite/tests/typecheck/should_fail/tcfail171.stderr b/testsuite/tests/typecheck/should_fail/tcfail171.stderr
index b4efd33e32..79ed5f80b7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail171.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail171.stderr
@@ -1,6 +1,8 @@
tcfail171.hs:9:10:
- No instances for (PrintfType b, PrintfArg a)
- arising from a use of `printf'
+ No instance for (PrintfArg a) arising from a use of `printf'
+ Possible fix:
+ add (PrintfArg a) to the context of
+ the type signature for phex :: a -> b
In the expression: printf "0x%x" x
In an equation for `phex': phex x = printf "0x%x" x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail173.stderr b/testsuite/tests/typecheck/should_fail/tcfail173.stderr
index ee8f59b525..4bda7d5c4c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail173.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail173.stderr
@@ -1,3 +1,4 @@
-tcfail173.hs:5:10:
- Malformed head of type or class declaration: (f <.> g) a
+tcfail173.hs:5:12:
+ Illegal declaration of a type or class operator `<.>'
+ Use -XTypeOperators to declare operators in type and declarations
diff --git a/testsuite/tests/typecheck/should_fail/tcfail174.stderr b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
index de8bb6004d..c4fb525c5e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail174.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
@@ -1,23 +1,31 @@
-
-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 expected type `forall x. x -> a0'
- with actual type `forall a. a -> a'
- Expected type: Capture (forall x. x -> a0)
- Actual type: Capture (forall a. a -> a)
- In the first argument of `Capture', namely `g'
- In the expression: Capture g
-
-tcfail174.hs:16:14:
- Couldn't match expected type `forall x. x -> a0'
- with actual type `forall a. a -> a'
- Expected type: Capture (forall x. x -> a0)
- Actual type: Capture (forall a. a -> a)
- In the first argument of `Capture', namely `g'
- In the expression: 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'
+ `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
diff --git a/testsuite/tests/typecheck/should_fail/tcfail175.stderr b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
index f181c00bcd..797b701d6d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail175.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
@@ -1,7 +1,8 @@
-
-tcfail175.hs:11:1:
- Couldn't match type `a' with `String -> String -> String'
- `a' is a rigid type variable bound by
- the type signature for evalRHS :: Int -> a at tcfail175.hs:11:1
- 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
+ The equation(s) for `evalRHS' have three arguments,
+ but its type `Int -> a' has only one
diff --git a/testsuite/tests/typecheck/should_fail/tcfail177.stderr b/testsuite/tests/typecheck/should_fail/tcfail177.stderr
index 3107d1e668..dc622daafa 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail177.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail177.stderr
@@ -7,3 +7,165 @@ tcfail177.hs:10:12:
[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
In an equation for `allTests':
allTests = foo [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", ....]
+
+tcfail177.hs:20:13:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:20:20:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:20:27:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:21:13:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:21:20:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:21:27:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:22:13:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:22:20:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:22:27:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:23:13:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:23:20:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:23:27:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:24:13:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:24:20:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:24:27:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:25:13:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:25:20:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
+
+tcfail177.hs:25:27:
+ Couldn't match expected type `Bool' with actual type `[Char]'
+ In the expression: "Two"
+ In the first argument of `foo', namely
+ `[a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]'
+ In the expression:
+ foo
+ [a ~?= b, "Three" ~?= "3", "Four" ~?= "4", "Five" ~?= "5", ....]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail178.stderr b/testsuite/tests/typecheck/should_fail/tcfail178.stderr
index 63119af75e..66773a2fea 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail178.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail178.stderr
@@ -1,10 +1,11 @@
tcfail178.hs:15:7:
- Couldn't match expected type `[a0]' with actual type `()'
+ Couldn't match type `()' with `[a0]'
Expected type: Bool -> [a0]
Actual type: Bool -> ()
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 `()'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail179.stderr b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
index 48f5e26d78..4962c8aae7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail179.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
@@ -1,14 +1,13 @@
-tcfail179.hs:14:37:
- Couldn't match type `s' with `x'
+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:13:1
+ 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
- Expected type: (s, x, Int)
- Actual type: (x, s, Int)
- In the return type of a call of `g'
+ 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/tcfail181.stderr b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
index 59fe8b83af..0e00427aa5 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail181.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
@@ -1,8 +1,13 @@
tcfail181.hs:17:9:
- Ambiguous type variable `m0' in the constraint:
- (Monad m0) arising from a use of `foo'
- Probable fix: add a type signature that fixes these type variable(s)
+ No instance for (Monad m0)
+ arising from a use of `foo'
+ The type variable `m0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Monad ((->) r) -- Defined in `GHC.Base'
+ instance Monad IO -- Defined in `GHC.Base'
+ instance Monad [] -- Defined in `GHC.Base'
In the expression: foo
In the expression: foo {bar = return True}
In an equation for `wog': wog x = foo {bar = return True}
diff --git a/testsuite/tests/typecheck/should_fail/tcfail186.stderr b/testsuite/tests/typecheck/should_fail/tcfail186.stderr
index 3f4504b810..b22e672ae6 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail186.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail186.stderr
@@ -1,7 +1,8 @@
tcfail186.hs:7:9:
- Couldn't match expected type `PhantomSyn a0'
- with actual type `[Char]'
+ Couldn't match type `[Char]' with `Int'
+ Expected type: PhantomSyn a0
+ Actual type: [Char]
In the first argument of `f', namely `"hoo"'
In the expression: f "hoo"
In an equation for `foo': foo = f "hoo"
diff --git a/testsuite/tests/typecheck/should_fail/tcfail189.stderr b/testsuite/tests/typecheck/should_fail/tcfail189.stderr
index b3a6cb4b96..6364cc2d5b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail189.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail189.stderr
@@ -1,8 +1,9 @@
tcfail189.hs:10:31:
- Couldn't match expected type `a -> t0' with actual type `[a0]'
- Expected type: (a -> t0) -> [a] -> [[a]]
+ Couldn't match type `[a0]' with `a -> a1'
+ Expected type: (a -> a1) -> [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 2
+ In a stmt of a list comprehension: then group by x using take 2
diff --git a/testsuite/tests/typecheck/should_fail/tcfail190.hs b/testsuite/tests/typecheck/should_fail/tcfail190.hs
index 7cc768af65..0e81b190d3 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail190.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail190.hs
@@ -1,13 +1,15 @@
--- Checks that the ordering constraint on the implicit groupWith is respected
+-- Checks that the ordering constraint on the groupWith function is respected
{-# OPTIONS_GHC -XTransformListComp #-}
module ShouldFail where
+import GHC.Exts (groupWith)
+
data Unorderable = Gnorf | Pinky | Brain
foo = [ ()
| x <- [Gnorf, Brain]
- , then group by x
+ , then group by x using groupWith
]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail190.stderr b/testsuite/tests/typecheck/should_fail/tcfail190.stderr
index a2e1034162..a6469e72d7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail190.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail190.stderr
@@ -1,8 +1,9 @@
-tcfail190.hs:12:9:
+tcfail190.hs:14:31:
No instance for (Ord Unorderable)
- arising from a use of `Control.Monad.Group.mgroupWith'
+ arising from a use of `groupWith'
Possible fix: add an instance declaration for (Ord Unorderable)
- In the expression: Control.Monad.Group.mgroupWith
- In a stmt of a list comprehension: then group by x
- In the expression: [() | x <- [Gnorf, Brain], then group by x]
+ In the expression: groupWith
+ In a stmt of a list comprehension: then group by x using groupWith
+ In the expression:
+ [() | x <- [Gnorf, Brain], then group by x using groupWith]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail191.stderr b/testsuite/tests/typecheck/should_fail/tcfail191.stderr
index 178eebf7ff..a276a04eae 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail191.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail191.stderr
@@ -4,6 +4,7 @@ tcfail191.hs:11:26:
`a' is a rigid type variable bound by
a type expected by the context: [a] -> [[a]] at tcfail191.hs:11:9
Expected type: [a] -> [[a]]
- Actual type: [[a]] -> [[a]]
+ Actual type: [a] -> [a]
In the return type of a call of `take'
In the expression: take 5
+ In a stmt of a list comprehension: then group using take 5
diff --git a/testsuite/tests/typecheck/should_fail/tcfail192.stderr b/testsuite/tests/typecheck/should_fail/tcfail192.stderr
index a957fba52a..349121975c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail192.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail192.stderr
@@ -1,19 +1,20 @@
-
-tcfail192.hs:8:11:
- No instance for (Num [[Char]])
- arising from a use of `+'
- Possible fix: add an instance declaration for (Num [[Char]])
- In the expression: x + 1
- In the expression:
- [x + 1 | x <- ["Hello", "World"], then group using take 5]
- In an equation for `foo':
- foo = [x + 1 | x <- ["Hello", "World"], then group using take 5]
-
-tcfail192.hs:10:26:
- Couldn't match type `a' with `[a]'
- `a' is a rigid type variable bound by
- a type expected by the context: [a] -> [[a]] at tcfail192.hs:10:9
- Expected type: [a] -> [[a]]
- Actual type: [[a]] -> [[a]]
- In the return type of a call of `take'
- In the expression: take 5
+
+tcfail192.hs:8:11:
+ No instance for (Num [[Char]])
+ arising from a use of `+'
+ Possible fix: add an instance declaration for (Num [[Char]])
+ In the expression: x + 1
+ In the expression:
+ [x + 1 | x <- ["Hello", "World"], then group using take 5]
+ In an equation for `foo':
+ foo = [x + 1 | x <- ["Hello", "World"], then group using take 5]
+
+tcfail192.hs:10:26:
+ Couldn't match type `a' with `[a]'
+ `a' is a rigid type variable bound by
+ a type expected by the context: [a] -> [[a]] at tcfail192.hs:10:9
+ Expected type: [a] -> [[a]]
+ Actual type: [a] -> [a]
+ In the return type of a call of `take'
+ In the expression: take 5
+ In a stmt of a list comprehension: then group using take 5
diff --git a/testsuite/tests/typecheck/should_fail/tcfail193.stderr b/testsuite/tests/typecheck/should_fail/tcfail193.stderr
index f19720f796..47375e8401 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail193.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail193.stderr
@@ -1,7 +1,10 @@
tcfail193.hs:10:31:
- Occurs check: cannot construct the infinite type: a0 = [a0]
+ Couldn't match type `a' with `[a]'
+ `a' is a rigid type variable bound by
+ a type expected by the context: [a] -> [a] at tcfail193.hs:10:26
Expected type: [a] -> [a]
- Actual type: [a0] -> [[a0]]
+ Actual type: [a] -> [[a]]
In the expression: inits
In a stmt of a list comprehension: then inits
+ In the expression: [x | x <- [3, 2, 1], then inits]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail194.stderr b/testsuite/tests/typecheck/should_fail/tcfail194.stderr
index be6e37ec6b..34cf179439 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail194.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail194.stderr
@@ -1,8 +1,37 @@
+tcfail194.hs:9:15:
+ No instance for (Enum t0)
+ arising from the arithmetic sequence `1 .. 10'
+ The type variable `t0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Enum Double -- Defined in `GHC.Float'
+ instance Enum Float -- Defined in `GHC.Float'
+ instance Enum () -- Defined in `GHC.Enum'
+ ...plus five others
+ In the expression: [1 .. 10]
+ In a stmt of a list comprehension: x <- [1 .. 10]
+ In a stmt of a list comprehension: then take 5 by x
+
+tcfail194.hs:9:16:
+ No instance for (Num t0)
+ arising from the literal `1'
+ The type variable `t0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Num Int -- Defined in `GHC.Num'
+ ...plus one other
+ In the expression: 1
+ In the expression: [1 .. 10]
+ In a stmt of a list comprehension: x <- [1 .. 10]
+
tcfail194.hs:9:29:
- Couldn't match expected type `a -> t0' with actual type `[a0]'
+ 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
diff --git a/testsuite/tests/typecheck/should_fail/tcfail195.stderr b/testsuite/tests/typecheck/should_fail/tcfail195.stderr
index 5816773f48..d690ebac82 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail195.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail195.stderr
@@ -1,5 +1,5 @@
-
-tcfail195.hs:6:3:
- Illegal polymorphic or qualified type: forall a. a
- In the definition of data constructor `Foo'
- In the data type declaration for `Foo'
+
+tcfail195.hs:6:3:
+ Illegal polymorphic or qualified type: forall a. a
+ In the definition of data constructor `Foo'
+ In the data declaration for `Foo'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail196.stderr b/testsuite/tests/typecheck/should_fail/tcfail196.stderr
index 79cc7266eb..ea6f16fd98 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail196.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail196.stderr
@@ -1,5 +1,5 @@
-
-tcfail196.hs:5:1:
- Illegal polymorphic or qualified type: forall a. a
- In the type signature for `bar':
- bar :: Num (forall a. a) => Int -> Int
+
+tcfail196.hs:5:8:
+ Illegal polymorphic or qualified type: forall a. a
+ In the type signature for `bar':
+ bar :: Num (forall a. a) => Int -> Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail197.stderr b/testsuite/tests/typecheck/should_fail/tcfail197.stderr
index 3abe57be7b..464dacb078 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail197.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail197.stderr
@@ -1,6 +1,5 @@
-tcfail197.hs:5:1:
+tcfail197.hs:5:8:
Illegal polymorphic or qualified type: forall a. a
Perhaps you intended to use -XImpredicativeTypes
- In the type signature for `foo':
- foo :: [forall a. a] -> Int
+ In the type signature for `foo': foo :: [forall a. a] -> Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail198.stderr b/testsuite/tests/typecheck/should_fail/tcfail198.stderr
index 27fbf92f5a..bba13900de 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail198.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail198.stderr
@@ -1,10 +1,10 @@
tcfail198.hs:6:36:
- Couldn't match type `a' with `a1'
- `a' is a rigid type variable bound by
- the inferred type of f3 :: [a] -> [a] at tcfail198.hs:6:1
+ Couldn't match expected type `a1' with actual type `a'
`a1' is a rigid type variable bound by
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
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 23dd02614b..6a60b9fc90 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail201.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
@@ -1,15 +1,14 @@
-
-tcfail201.hs:18:28:
- Couldn't match type `a' with `HsDoc id0'
- `a' is a rigid type variable bound by
- the type signature for
- gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
- -> (forall g. g -> c g) -> a -> c a
- at tcfail201.hs:16:1
- In the pattern: DocParagraph hsDoc
- In a case alternative:
- (DocParagraph hsDoc) -> z DocParagraph `k` hsDoc
- In the expression:
- case hsDoc of {
- DocEmpty -> z DocEmpty
- (DocParagraph hsDoc) -> z DocParagraph `k` hsDoc }
+
+tcfail201.hs:17:27:
+ Couldn't match expected type `a' with actual type `HsDoc t0'
+ `a' is a rigid type variable bound by
+ the type signature for
+ 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 pattern: DocEmpty
+ In a case alternative: DocEmpty -> z DocEmpty
+ In the expression:
+ case hsDoc of {
+ DocEmpty -> z DocEmpty
+ (DocParagraph hsDoc) -> z DocParagraph `k` hsDoc }
diff --git a/testsuite/tests/typecheck/should_fail/tcfail206.hs b/testsuite/tests/typecheck/should_fail/tcfail206.hs
index a256bc3e34..95b0eba359 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail206.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail206.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE TupleSections, UnboxedTuples #-}
-module Main where
+module ShouldCompile where
a :: Bool -> (Int, Bool)
a = ( , True)
@@ -18,5 +18,3 @@ e = (#1, #)
f :: a -> (#a, Bool#)
f = (#True || False, #)
-
-main = return () \ No newline at end of file
diff --git a/testsuite/tests/typecheck/should_fail/tcfail206.stderr b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
index fb812f1cbf..3283089afc 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail206.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
@@ -1,48 +1,47 @@
-
-tcfail206.hs:5:5:
- Couldn't match expected type `Int' with actual type `Bool'
- Expected type: Bool -> (Int, Bool)
- Actual type: Bool -> (Bool, t0)
- In the expression: (, True)
- In an equation for `a': a = (, True)
-
-tcfail206.hs:8:5:
- Couldn't match expected type `Bool -> (Int, Bool)'
- with actual type `(t0, Int)'
- Expected type: Int -> Bool -> (Int, Bool)
- Actual type: Int -> (t0, Int)
- In the expression: (1,)
- In an equation for `b': b = (1,)
-
-tcfail206.hs:11:5:
- Couldn't match type `a' with `Bool'
- `a' is a rigid type variable bound by
- the type signature for c :: a -> (a, Bool) at tcfail206.hs:11:1
- Expected type: a -> (a, Bool)
- Actual type: Bool -> (Bool, Bool)
- In the expression: (True || False,)
- In an equation for `c': c = (True || False,)
-
-tcfail206.hs:14:5:
- Couldn't match expected type `Int' with actual type `Bool'
- Expected type: Bool -> (# Int, Bool #)
- Actual type: Bool -> (# Bool, t0 #)
- In the expression: (# , True #)
- In an equation for `d': d = (# , True #)
-
-tcfail206.hs:17:5:
- Couldn't match expected type `Bool -> (# Int, Bool #)'
- with actual type `(# t0, Int #)'
- Expected type: Int -> Bool -> (# Int, Bool #)
- Actual type: Int -> (# t0, Int #)
- In the expression: (# 1, #)
- In an equation for `e': e = (# 1, #)
-
-tcfail206.hs:20:5:
- Couldn't match type `a' with `Bool'
- `a' is a rigid type variable bound by
- the type signature for f :: a -> (# a, Bool #) at tcfail206.hs:20:1
- Expected type: a -> (# a, Bool #)
- Actual type: a -> (# a, a #)
- In the expression: (# True || False, #)
- In an equation for `f': f = (# True || False, #)
+
+tcfail206.hs:5:5:
+ Couldn't match type `Bool' with `Int'
+ Expected type: Bool -> (Int, Bool)
+ Actual type: Bool -> (Bool, Bool)
+ In the expression: (, True)
+ In an equation for `a': a = (, True)
+
+tcfail206.hs:8:5:
+ Couldn't match type `(Integer, Int)' with `Bool -> (Int, Bool)'
+ Expected type: Int -> Bool -> (Int, Bool)
+ Actual type: Int -> (Integer, Int)
+ In the expression: (1,)
+ In an equation for `b': b = (1,)
+
+tcfail206.hs:11:5:
+ Couldn't match type `a' with `Bool'
+ `a' is a rigid type variable bound by
+ the type signature for c :: a -> (a, Bool) at tcfail206.hs:10:6
+ Expected type: a -> (a, Bool)
+ Actual type: a -> (a, a)
+ In the expression: (True || False,)
+ In an equation for `c': c = (True || False,)
+
+tcfail206.hs:14:5:
+ Couldn't match type `Bool' with `Int'
+ Expected type: Bool -> (# Int, Bool #)
+ Actual type: Bool -> (# Bool, Bool #)
+ In the expression: (# , True #)
+ In an equation for `d': d = (# , True #)
+
+tcfail206.hs:17:5:
+ Couldn't match type `(# Integer, Int #)'
+ with `Bool -> (# Int, Bool #)'
+ Expected type: Int -> Bool -> (# Int, Bool #)
+ Actual type: Int -> (# Integer, Int #)
+ In the expression: (# 1, #)
+ In an equation for `e': e = (# 1, #)
+
+tcfail206.hs:20:5:
+ Couldn't match type `a' with `Bool'
+ `a' is a rigid type variable bound by
+ the type signature for f :: a -> (# a, Bool #) at tcfail206.hs:19:6
+ Expected type: a -> (# a, Bool #)
+ Actual type: a -> (# a, a #)
+ In the expression: (# True || False, #)
+ In an equation for `f': f = (# True || False, #)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail207.stderr b/testsuite/tests/typecheck/should_fail/tcfail207.stderr
index 307b4044d5..3e96a0994e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail207.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail207.stderr
@@ -1,7 +1,7 @@
tcfail207.hs:5:7:
Couldn't match expected type `[Int] -> [Int]'
- with actual type `[a0]'
+ with actual type `[a1]'
In the return type of a call of `take'
Probable cause: `take' is applied to too many arguments
In the expression: take x []
diff --git a/testsuite/tests/typecheck/should_fail/tcfail208.stderr b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
index 64200a696d..d606115ad1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail208.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
@@ -4,10 +4,7 @@ tcfail208.hs:4:19:
from the context (Monad m, Eq a)
bound by the type signature for
f :: (Monad m, Eq a) => a -> m a -> Bool
- at tcfail208.hs:4:1-23
- Possible fix:
- add (Eq (m a)) to the context of
- the type signature for f :: (Monad m, Eq a) => a -> m a -> Bool
- or add an instance declaration for (Eq (m a))
+ 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)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail209.stderr b/testsuite/tests/typecheck/should_fail/tcfail209.stderr
index 2101c99ca1..b5329ff6dc 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail209.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail209.stderr
@@ -1,12 +1,11 @@
-tcfail209.hs:5:1:
+tcfail209.hs:5:6:
Illegal irreducible constraint Showish a
(Use -XConstraintKinds to permit this)
In the type signature for `f': f :: Showish a => a -> a
-tcfail209.hs:8:8:
- Predicate `Show a' used as a type
- The first argument of a tuple should have kind `*',
- but `Show a' has kind `Constraint'
+tcfail209.hs:8:6:
+ Illegal tuple constraint (Show a, Num a)
+ (Use -XConstraintKinds to permit this)
In the type signature for `g':
g :: ((Show a, Num a), Eq a) => a -> a
diff --git a/testsuite/tests/typecheck/should_fail/tcfail212.stderr b/testsuite/tests/typecheck/should_fail/tcfail212.stderr
index c61b88c98c..66f0bb2e1f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail212.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail212.stderr
@@ -1,12 +1,8 @@
tcfail212.hs:10:7:
- `Maybe' is not applied to enough type arguments
- The first argument of a tuple should have kind `*',
- but `Maybe' has kind `* -> *'
+ Expecting one more argument to `Maybe'
In the type signature for `f': f :: (Maybe, Either Int)
tcfail212.hs:13:7:
Expecting a lifted type, but `Int#' is unlifted
- The first argument of a tuple should have kind `*',
- but `Int#' has kind `#'
In the type signature for `g': g :: (Int#, Int#)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail215.stderr b/testsuite/tests/typecheck/should_fail/tcfail215.stderr
index c38e24e55c..75c894eda6 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail215.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail215.stderr
@@ -1,6 +1,4 @@
tcfail215.hs:8:15:
Expecting a lifted type, but `Int#' is unlifted
- The type argument of the implicit parameter had kind `*',
- but `Int#' has kind `#'
In the type signature for `foo': foo :: ?x :: Int# => Int