summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/annotations/should_fail/annfail08.stderr34
-rw-r--r--testsuite/tests/annotations/should_fail/annfail10.stderr17
-rw-r--r--testsuite/tests/arrows/should_fail/T5380.stderr46
-rw-r--r--testsuite/tests/deriving/should_fail/T5287.stderr17
-rw-r--r--testsuite/tests/gadt/T3169.stderr39
-rw-r--r--testsuite/tests/gadt/rw.stderr39
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break003.stderr2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break006.stderr12
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break018.stderr6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/dynbrk004.stderr6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print006.stdout2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print007.stderr4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print019.stderr6
-rwxr-xr-xtestsuite/tests/ghci/scripts/Defer02.script14
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr92
-rw-r--r--testsuite/tests/ghci/scripts/T3263.stderr8
-rw-r--r--testsuite/tests/ghci/scripts/T5130.stderr2
-rwxr-xr-x[-rw-r--r--]testsuite/tests/ghci/scripts/all.T1
-rw-r--r--testsuite/tests/ghci/scripts/ghci031.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/ghci047.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/ghci050.stderr17
-rw-r--r--testsuite/tests/ghci/scripts/ghci051.stderr4
-rw-r--r--testsuite/tests/indexed-types/should_compile/Simple14.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3208b.stderr6
-rw-r--r--testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr6
-rw-r--r--testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr4
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr17
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail5b.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T1897b.stderr28
-rw-r--r--testsuite/tests/indexed-types/should_fail/T1900.stderr38
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2239.stderr20
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2544.stderr35
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2664.stderr37
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2693.stderr49
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3330a.hs4
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3330a.stderr19
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3330c.stderr29
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3440.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4099.stderr30
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4174.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4179.stderr43
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4272.hs2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4272.stderr45
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4485.stderr48
-rw-r--r--testsuite/tests/indexed-types/should_fail/T5439.stderr10
-rw-r--r--testsuite/tests/indexed-types/should_fail/all.T3
-rw-r--r--testsuite/tests/layout/layout001.stdout2
-rw-r--r--testsuite/tests/layout/layout003.stdout2
-rw-r--r--testsuite/tests/layout/layout006.stdout2
-rw-r--r--testsuite/tests/parser/should_compile/read064.stderr2
-rw-r--r--testsuite/tests/parser/should_compile/read066.stderr2
-rw-r--r--testsuite/tests/rebindable/DoParamM.stderr17
-rw-r--r--testsuite/tests/rebindable/rebindable6.stderr30
-rw-r--r--testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr2
-rw-r--r--testsuite/tests/simplCore/should_compile/simpl017.stderr48
-rw-r--r--testsuite/tests/th/T5358.stderr11
-rw-r--r--testsuite/tests/th/TH_reifyDecl1.hs3
-rw-r--r--testsuite/tests/th/TH_reifyDecl1.stderr66
-rw-r--r--testsuite/tests/th/TH_reifyMkName.hs3
-rw-r--r--testsuite/tests/th/TH_reifyMkName.stderr4
-rw-r--r--testsuite/tests/typecheck/prog001/typecheck.prog001.stderr-ghc8
-rw-r--r--testsuite/tests/typecheck/should_compile/FD2.stderr50
-rw-r--r--testsuite/tests/typecheck/should_compile/T2494.stderr46
-rw-r--r--testsuite/tests/typecheck/should_compile/T4912.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/tc168.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc211.stderr31
-rw-r--r--testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr143
-rw-r--r--testsuite/tests/typecheck/should_fail/T1897a.stderr10
-rw-r--r--testsuite/tests/typecheck/should_fail/T1899.stderr21
-rw-r--r--testsuite/tests/typecheck/should_fail/T2414.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/T2688.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/T2714.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T2846b.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T3102.stderr1
-rw-r--r--testsuite/tests/typecheck/should_fail/T3613.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/T3950.stderr20
-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.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T5684.stderr30
-rw-r--r--testsuite/tests/typecheck/should_fail/T5689.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T2
-rw-r--r--testsuite/tests/typecheck/should_fail/mc19.stderr19
-rw-r--r--testsuite/tests/typecheck/should_fail/mc21.stderr19
-rw-r--r--testsuite/tests/typecheck/should_fail/mc22.stderr41
-rw-r--r--testsuite/tests/typecheck/should_fail/mc23.stderr32
-rw-r--r--testsuite/tests/typecheck/should_fail/mc24.stderr35
-rw-r--r--testsuite/tests/typecheck/should_fail/mc25.stderr34
-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.stderr21
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail016.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail018.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail040.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail043.stderr58
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail065.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail067.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail068.stderr188
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail072.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail076.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/tcfail099.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail103.stderr23
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail104.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail128.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail133.stderr12
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail140.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail142.stderr7
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail143.stderr33
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail153.stderr2
-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.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail174.stderr60
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail175.stderr3
-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.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail181.stderr7
-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/tcfail191.stderr19
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail192.stderr39
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail193.stderr19
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail194.stderr21
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail198.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail201.stderr30
-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
-rwxr-xr-xtestsuite/tests/typecheck/should_run/Defer01.hs53
-rw-r--r--testsuite/tests/typecheck/should_run/Defer01.stdout1
-rwxr-xr-x[-rw-r--r--]testsuite/tests/typecheck/should_run/all.T3
-rw-r--r--testsuite/tests/typecheck/should_run/tcrun041.hs2
136 files changed, 1685 insertions, 1077 deletions
diff --git a/testsuite/tests/annotations/should_fail/annfail08.stderr b/testsuite/tests/annotations/should_fail/annfail08.stderr
index a97ca4e2b5..7e9b112dca 100644
--- a/testsuite/tests/annotations/should_fail/annfail08.stderr
+++ b/testsuite/tests/annotations/should_fail/annfail08.stderr
@@ -1,15 +1,19 @@
-
-annfail08.hs:9:1:
- No instance for (Data.Data.Data (a0 -> a0))
- arising from an annotation
- Possible fix:
- add an instance declaration for (Data.Data.Data (a0 -> a0))
- In the expression: (id + 1)
- In the annotation: {-# ANN f (id + 1) #-}
-
-annfail08.hs:9:15:
- No instance for (Num (a0 -> a0))
- arising from a use of `+'
- Possible fix: add an instance declaration for (Num (a0 -> a0))
- In the expression: (id + 1)
- In the annotation: {-# ANN f (id + 1) #-}
+
+annfail08.hs:9:1:
+ No instance for (Data.Data.Data (a0 -> a0))
+ arising from an annotation
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Possible fix:
+ add an instance declaration for (Data.Data.Data (a0 -> a0))
+ In the expression: (id + 1)
+ In the annotation: {-# ANN f (id + 1) #-}
+
+annfail08.hs:9:15:
+ No instance for (Num (a0 -> a0))
+ arising from a use of `+'
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Possible fix: add an instance declaration for (Num (a0 -> a0))
+ In the expression: (id + 1)
+ In the annotation: {-# ANN f (id + 1) #-}
diff --git a/testsuite/tests/annotations/should_fail/annfail10.stderr b/testsuite/tests/annotations/should_fail/annfail10.stderr
index eac3002efa..33a4c16a9b 100644
--- a/testsuite/tests/annotations/should_fail/annfail10.stderr
+++ b/testsuite/tests/annotations/should_fail/annfail10.stderr
@@ -1,9 +1,16 @@
annfail10.hs:9:1:
- Ambiguous type variable `a0' in the constraints:
- (Data.Data.Data a0) arising from an annotation
- at annfail10.hs:9:1-15
- (Num a0) arising from the literal `1' at annfail10.hs:9:11
- Probable fix: add a type signature that fixes these type variable(s)
+ No instance for (Data.Data.Data a0)
+ arising from an annotation
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the expression: 1
+ In the annotation: {-# ANN f 1 #-}
+
+annfail10.hs:9:11:
+ No instance for (Num a0)
+ arising from the literal `1'
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
In the expression: 1
In the annotation: {-# ANN f 1 #-}
diff --git a/testsuite/tests/arrows/should_fail/T5380.stderr b/testsuite/tests/arrows/should_fail/T5380.stderr
index 07b89eef84..c9df47cf6f 100644
--- a/testsuite/tests/arrows/should_fail/T5380.stderr
+++ b/testsuite/tests/arrows/should_fail/T5380.stderr
@@ -1,22 +1,24 @@
-
-T5380.hs:7:27:
- Couldn't match type `not_bool' with `Bool'
- `not_bool' is a rigid type variable bound by
- the type signature for
- testB :: not_bool -> (() -> ()) -> () -> not_unit
- at T5380.hs:7:1
- In the expression: b
- In the expression: proc () -> if b then f -< () else f -< ()
- In an equation for `testB':
- testB b f = proc () -> if b then f -< () else f -< ()
-
-T5380.hs:7:34:
- Couldn't match type `not_unit' with `()'
- `not_unit' is a rigid type variable bound by
- the type signature for
- testB :: not_bool -> (() -> ()) -> () -> not_unit
- at T5380.hs:7:1
- Expected type: () -> not_unit
- Actual type: () -> ()
- In the expression: f
- In the expression: proc () -> if b then f -< () else f -< ()
+
+T5380.hs:7:27:
+ Couldn't match expected type `not_bool' with actual type `Bool'
+ `not_bool' is a rigid type variable bound by
+ the type signature for
+ testB :: not_bool -> (() -> ()) -> () -> not_unit
+ at T5380.hs:7:1
+ In the expression: b
+ In the expression: proc () -> if b then f -< () else f -< ()
+ In an equation for `testB':
+ testB b f = proc () -> if b then f -< () else f -< ()
+
+T5380.hs:7:34:
+ Couldn't match type `not_unit' with `()'
+ `not_unit' is a rigid type variable bound by
+ the type signature for
+ testB :: not_bool -> (() -> ()) -> () -> not_unit
+ at T5380.hs:7:1
+ Expected type: () -> not_unit
+ Actual type: () -> ()
+ In the expression: f
+ In the expression: proc () -> if b then f -< () else f -< ()
+ In an equation for `testB':
+ testB b f = proc () -> if b then f -< () else f -< ()
diff --git a/testsuite/tests/deriving/should_fail/T5287.stderr b/testsuite/tests/deriving/should_fail/T5287.stderr
index 4067522580..e95212f67e 100644
--- a/testsuite/tests/deriving/should_fail/T5287.stderr
+++ b/testsuite/tests/deriving/should_fail/T5287.stderr
@@ -1,7 +1,10 @@
-
-T5287.hs:6:29:
- Ambiguous type variable `oops' in the constraint:
- (A e oops)
- arising from the 'deriving' clause of a data type declaration
- Probable fix: use a 'standalone deriving' declaration instead
- When deriving the instance for (Read (E e))
+
+T5287.hs:6:29:
+ No instance for (A e oops)
+ arising from the 'deriving' clause of a data type declaration
+ The type variable `oops' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Possible fix:
+ use a standalone 'deriving instance' declaration,
+ so you can specify the instance context yourself
+ When deriving the instance for (Read (E e))
diff --git a/testsuite/tests/gadt/T3169.stderr b/testsuite/tests/gadt/T3169.stderr
index 878324caeb..c1ee5b5e2f 100644
--- a/testsuite/tests/gadt/T3169.stderr
+++ b/testsuite/tests/gadt/T3169.stderr
@@ -1,11 +1,28 @@
-
-T3169.hs:13:13:
- Couldn't match type `elt' with `Map b elt'
- `elt' is a rigid type variable bound by
- the type signature for
- lookup :: (a, b) -> Map (a, b) elt -> Maybe elt
- at T3169.hs:12:3
- Expected type: Maybe (Map b elt)
- Actual type: Maybe elt
- In the return type of a call of `lookup'
- In the expression: lookup a m :: Maybe (Map b elt)
+
+T3169.hs:13:13:
+ Could not deduce (elt ~ Map b elt)
+ from the context (Key a, Key b)
+ bound by the instance declaration at T3169.hs:10:10-36
+ `elt' is a rigid type variable bound by
+ the type signature for
+ lookup :: (a, b) -> Map (a, b) elt -> Maybe elt
+ at T3169.hs:12:3
+ Expected type: Maybe (Map b elt)
+ Actual type: Maybe elt
+ In the return type of a call of `lookup'
+ In the expression: lookup a m :: Maybe (Map b elt)
+ In the expression:
+ case lookup a m :: Maybe (Map b elt) of {
+ Just (m2 :: Map b elt) -> lookup b m2 :: Maybe elt }
+
+T3169.hs:13:22:
+ Could not deduce (Map a ~ MP a b)
+ from the context (Key a, Key b)
+ bound by the instance declaration at T3169.hs:10:10-36
+ Expected type: Map a elt
+ Actual type: Map (a, b) elt
+ In the second argument of `lookup', namely `m'
+ In the expression: lookup a m :: Maybe (Map b elt)
+ In the expression:
+ case lookup a m :: Maybe (Map b elt) of {
+ Just (m2 :: Map b elt) -> lookup b m2 :: Maybe elt }
diff --git a/testsuite/tests/gadt/rw.stderr b/testsuite/tests/gadt/rw.stderr
index 4c0c0ce6cd..752d0fd8a3 100644
--- a/testsuite/tests/gadt/rw.stderr
+++ b/testsuite/tests/gadt/rw.stderr
@@ -1,19 +1,20 @@
-
-rw.hs:14:47:
- Couldn't match type `a' with `Int'
- `a' is a rigid type variable bound by
- the type signature for writeInt :: T a -> IORef a -> IO ()
- at rw.hs:13:1
- In the second argument of `writeIORef', namely `(1 :: Int)'
- In the expression: writeIORef ref (1 :: Int)
- In a case alternative: ~(Li x) -> writeIORef ref (1 :: Int)
-
-rw.hs:19:51:
- Couldn't match type `a' with `Bool'
- `a' is a rigid type variable bound by
- the type signature for readBool :: T a -> IORef a -> IO ()
- at rw.hs:17:1
- Expected type: a -> Bool
- Actual type: Bool -> Bool
- In the second argument of `(.)', namely `not'
- In the second argument of `(>>=)', namely `(print . not)'
+
+rw.hs:14:47:
+ Couldn't match expected type `a' with actual type `Int'
+ `a' is a rigid type variable bound by
+ the type signature for writeInt :: T a -> IORef a -> IO ()
+ at rw.hs:13:1
+ In the second argument of `writeIORef', namely `(1 :: Int)'
+ In the expression: writeIORef ref (1 :: Int)
+ In a case alternative: ~(Li x) -> writeIORef ref (1 :: Int)
+
+rw.hs:19:51:
+ Couldn't match type `a' with `Bool'
+ `a' is a rigid type variable bound by
+ the type signature for readBool :: T a -> IORef a -> IO ()
+ at rw.hs:17:1
+ Expected type: a -> Bool
+ Actual type: Bool -> Bool
+ In the second argument of `(.)', namely `not'
+ In the second argument of `(>>=)', namely `(print . not)'
+ In the expression: readIORef ref >>= (print . not)
diff --git a/testsuite/tests/ghci.debugger/scripts/break003.stderr b/testsuite/tests/ghci.debugger/scripts/break003.stderr
index f5944094e7..58f1b68f78 100644
--- a/testsuite/tests/ghci.debugger/scripts/break003.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break003.stderr
@@ -2,5 +2,7 @@
<interactive>:5:1:
No instance for (Show (t -> a))
arising from a use of `print'
+ Cannot resolve unknown runtime types `t', `a'
+ Use :print or :force to determine these types
Possible fix: add an instance declaration for (Show (t -> a))
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci.debugger/scripts/break006.stderr b/testsuite/tests/ghci.debugger/scripts/break006.stderr
index 40bb7861e0..7ee08988ab 100644
--- a/testsuite/tests/ghci.debugger/scripts/break006.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break006.stderr
@@ -1,14 +1,14 @@
<interactive>:6:1:
- Ambiguous type variable `a' in the constraint:
- (Show a) arising from a use of `print'
- Cannot resolve unknown runtime types: a
+ No instance for (Show a)
+ arising from a use of `print'
+ Cannot resolve unknown runtime type `a'
Use :print or :force to determine these types
In a stmt of an interactive GHCi command: print it
<interactive>:8:1:
- Ambiguous type variable `a' in the constraint:
- (Show a) arising from a use of `print'
- Cannot resolve unknown runtime types: a
+ No instance for (Show a)
+ arising from a use of `print'
+ Cannot resolve unknown runtime type `a'
Use :print or :force to determine these types
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci.debugger/scripts/break018.stderr b/testsuite/tests/ghci.debugger/scripts/break018.stderr
index 0107b5880f..d0bb1e0d0a 100644
--- a/testsuite/tests/ghci.debugger/scripts/break018.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break018.stderr
@@ -1,3 +1,3 @@
-
-<no location info>:
- Warning: -XRecursiveDo is deprecated: use -XDoRec or pragma {-# LANGUAGE DoRec #-} instead
+
+<no location info>: Warning:
+ -XRecursiveDo is deprecated: use -XDoRec or pragma {-# LANGUAGE DoRec #-} instead
diff --git a/testsuite/tests/ghci.debugger/scripts/dynbrk004.stderr b/testsuite/tests/ghci.debugger/scripts/dynbrk004.stderr
index 0107b5880f..d0bb1e0d0a 100644
--- a/testsuite/tests/ghci.debugger/scripts/dynbrk004.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/dynbrk004.stderr
@@ -1,3 +1,3 @@
-
-<no location info>:
- Warning: -XRecursiveDo is deprecated: use -XDoRec or pragma {-# LANGUAGE DoRec #-} instead
+
+<no location info>: Warning:
+ -XRecursiveDo is deprecated: use -XDoRec or pragma {-# LANGUAGE DoRec #-} instead
diff --git a/testsuite/tests/ghci.debugger/scripts/print006.stdout b/testsuite/tests/ghci.debugger/scripts/print006.stdout
index 1cf7de8a8e..72a0328b2f 100644
--- a/testsuite/tests/ghci.debugger/scripts/print006.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print006.stdout
@@ -2,7 +2,7 @@ t = O (_t1::a)
()
t = O ((_t2::a1) : (_t3::[a1]))
()
-t = O ((_t4::a2) : (_t5::a2) : (_t6::[a2]))
+t = O ((_t4::a1) : (_t5::a1) : (_t6::[a1]))
()
t = O ((_t7::Maybe [Integer]) : Just [2,2] :
(_t8::[Maybe [Integer]]))
diff --git a/testsuite/tests/ghci.debugger/scripts/print007.stderr b/testsuite/tests/ghci.debugger/scripts/print007.stderr
index 713c629818..d298a59365 100644
--- a/testsuite/tests/ghci.debugger/scripts/print007.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/print007.stderr
@@ -1,3 +1,3 @@
-<no location info>:
- Warning: -O conflicts with --interactive; -O ignored.
+<no location info>: Warning:
+ -O conflicts with --interactive; -O ignored.
diff --git a/testsuite/tests/ghci.debugger/scripts/print019.stderr b/testsuite/tests/ghci.debugger/scripts/print019.stderr
index 5cc34662fe..e272ce9e1f 100644
--- a/testsuite/tests/ghci.debugger/scripts/print019.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/print019.stderr
@@ -1,7 +1,7 @@
<interactive>:11:1:
- Ambiguous type variable `a1' in the constraint:
- (Show a1) arising from a use of `print'
- Cannot resolve unknown runtime types: a1
+ No instance for (Show a1)
+ arising from a use of `print'
+ Cannot resolve unknown runtime type `a1'
Use :print or :force to determine these types
In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci/scripts/Defer02.script b/testsuite/tests/ghci/scripts/Defer02.script
new file mode 100755
index 0000000000..3fc6aff5b0
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/Defer02.script
@@ -0,0 +1,14 @@
+-- Test -fwarn-type-errors
+-- This test shows how each error is printed at runtime
+:l ../../typecheck/should_run/Defer01
+t5624
+print a
+print (b B)
+print (c (C2 True))
+print (d ())
+print f
+print (h ())
+print (i ())
+print j
+print (k 2)
+l \ No newline at end of file
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
new file mode 100644
index 0000000000..4a17b34d19
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -0,0 +1,92 @@
+
+../../typecheck/should_run/Defer01.hs:11:40: Warning:
+ Couldn't match type `Char' with `[Char]'
+ Expected type: String
+ Actual type: Char
+ In the first argument of `putStr', namely ','
+ In the second argument of `(>>)', namely putStr ','
+ In the expression: putStr "Hello World" >> putStr ','
+
+../../typecheck/should_run/Defer01.hs:14:5: Warning:
+ Couldn't match expected type `Int' with actual type `Char'
+ In the expression: 'p'
+ In an equation for `a': a = 'p'
+
+../../typecheck/should_run/Defer01.hs:18:9: Warning:
+ No instance for (Eq B)
+ arising from a use of `=='
+ Possible fix: add an instance declaration for (Eq B)
+ In the expression: x == x
+ In an equation for `b': b x = x == x
+
+../../typecheck/should_run/Defer01.hs:28:5: Warning:
+ No instance for (Num (a -> a))
+ arising from the literal `1'
+ Possible fix: add an instance declaration for (Num (a -> a))
+ In the expression: 1
+ In an equation for `d': d = 1
+
+../../typecheck/should_run/Defer01.hs:31:5: Warning:
+ Couldn't match expected type `Char -> t' with actual type `Char'
+ The function `e' is applied to one argument,
+ but its type `Char' has none
+ In the expression: e 'q'
+ In an equation for `f': f = e 'q'
+
+../../typecheck/should_run/Defer01.hs:34:8: Warning:
+ Couldn't match expected type `a' with actual type `Char'
+ `a' is a rigid type variable bound by
+ the type signature for h :: a -> (Char, Char)
+ at ../../typecheck/should_run/Defer01.hs:34:1
+ In the expression: x
+ In the expression: (x, 'c')
+ In an equation for `h': h x = (x, 'c')
+
+../../typecheck/should_run/Defer01.hs:39:17: Warning:
+ Couldn't match expected type `Bool' with actual type `T a'
+ In the return type of a call of `K'
+ In the first argument of `not', namely `(K a)'
+ In the first argument of `seq', namely `(not (K a))'
+
+../../typecheck/should_run/Defer01.hs:43:5: Warning:
+ No instance for (MyClass a1)
+ arising from a use of `myOp'
+ The type variable `a1' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the expression: myOp 23
+ In an equation for `j': j = myOp 23
+
+../../typecheck/should_run/Defer01.hs:43:10: Warning:
+ No instance for (Num a1)
+ arising from the literal `23'
+ The type variable `a1' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the first argument of `myOp', namely `23'
+ In the expression: myOp 23
+ In an equation for `j': j = myOp 23
+
+../../typecheck/should_run/Defer01.hs:46:7: Warning:
+ Couldn't match expected type `Bool' with actual type `Int'
+ In the expression: x
+ In an equation for `k': k x = x
+
+../../typecheck/should_run/Defer01.hs:49:5: Warning:
+ Couldn't match expected type `IO a0'
+ with actual type `Char -> IO ()'
+ In the first argument of `(>>)', namely `putChar'
+ In the expression: putChar >> putChar 'p'
+ In an equation for `l': l = putChar >> putChar 'p'
+
+<interactive>:8:11:
+ Couldn't match type `Bool' with `Int'
+ Expected type: C Int
+ Actual type: C Bool
+ In the return type of a call of `C2'
+ In the first argument of `c', namely `(C2 True)'
+ In the first argument of `print', namely `(c (C2 True))'
+
+<interactive>:14:8:
+ Couldn't match expected type `Bool' with actual type `Int'
+ In the first argument of `print', namely `(k 2)'
+ In the expression: print (k 2)
+ In an equation for `it': it = print (k 2)
diff --git a/testsuite/tests/ghci/scripts/T3263.stderr b/testsuite/tests/ghci/scripts/T3263.stderr
index a7924e4b7f..b8c47887e4 100644
--- a/testsuite/tests/ghci/scripts/T3263.stderr
+++ b/testsuite/tests/ghci/scripts/T3263.stderr
@@ -1,5 +1,5 @@
-T3263.hs:8:12:
- Warning: A do-notation statement discarded a result of type Char.
- Suppress this warning by saying "_ <- getChar",
- or by using the flag -fno-warn-unused-do-bind
+T3263.hs:8:12: Warning:
+ A do-notation statement discarded a result of type Char.
+ Suppress this warning by saying "_ <- getChar",
+ or by using the flag -fno-warn-unused-do-bind
diff --git a/testsuite/tests/ghci/scripts/T5130.stderr b/testsuite/tests/ghci/scripts/T5130.stderr
index b68777e594..3c31593991 100644
--- a/testsuite/tests/ghci/scripts/T5130.stderr
+++ b/testsuite/tests/ghci/scripts/T5130.stderr
@@ -1,6 +1,6 @@
<interactive>:3:27:
- Couldn't match type `a' with `[Char]'
+ Couldn't match expected type `a' with actual type `[Char]'
In the expression: "hi"
In the expression: [x, "hi"]
In the expression: (\ (x :: a, y :: a) -> [x, "hi"])
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index d8c1501915..b559dcf099 100644..100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -108,3 +108,4 @@ test('T5557', normal, ghci_script, ['T5557.script'])
test('T5566', normal, ghci_script, ['T5566.script'])
test('GhciKinds', normal, ghci_script, ['GhciKinds.script'])
test('T5564', normal, ghci_script, ['T5564.script'])
+test('Defer02', normal, ghci_script, ['Defer02.script']) \ No newline at end of file
diff --git a/testsuite/tests/ghci/scripts/ghci031.stderr b/testsuite/tests/ghci/scripts/ghci031.stderr
index 8e4256c7f4..6f72f603e1 100644
--- a/testsuite/tests/ghci/scripts/ghci031.stderr
+++ b/testsuite/tests/ghci/scripts/ghci031.stderr
@@ -1,3 +1,3 @@
-ghci031.hs:1:14:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+ghci031.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/ghci/scripts/ghci047.stderr b/testsuite/tests/ghci/scripts/ghci047.stderr
index 1807dcb866..0051710378 100644
--- a/testsuite/tests/ghci/scripts/ghci047.stderr
+++ b/testsuite/tests/ghci/scripts/ghci047.stderr
@@ -1,12 +1,16 @@
<interactive>:38:1:
Couldn't match type `HFalse' with `HTrue'
+ Expected type: HTrue
+ Actual type: Or HFalse HFalse
In the expression: f
In the expression: f $ Baz 'a'
In an equation for `it': it = f $ Baz 'a'
<interactive>:39:1:
Couldn't match type `HFalse' with `HTrue'
+ Expected type: HTrue
+ Actual type: Or HFalse HFalse
In the expression: f
In the expression: f $ Quz
In an equation for `it': it = f $ Quz
diff --git a/testsuite/tests/ghci/scripts/ghci050.stderr b/testsuite/tests/ghci/scripts/ghci050.stderr
index 6f0e2c2ff2..74dc9a9b94 100644
--- a/testsuite/tests/ghci/scripts/ghci050.stderr
+++ b/testsuite/tests/ghci/scripts/ghci050.stderr
@@ -1,8 +1,9 @@
-
-<interactive>:6:49:
- Couldn't match type `a' with `ListableElem (a, a)'
- `a' is a rigid type variable bound by
- the instance declaration at <interactive>:6:20
- In the expression: a
- In the expression: [a, b]
- In an equation for `asList': asList (a, b) = [a, b]
+
+<interactive>:6:49:
+ Couldn't match expected type `a'
+ with actual type `ListableElem (a, a)'
+ `a' is a rigid type variable bound by
+ the instance declaration at <interactive>:6:20
+ In the expression: a
+ In the expression: [a, b]
+ In an equation for `asList': asList (a, b) = [a, b]
diff --git a/testsuite/tests/ghci/scripts/ghci051.stderr b/testsuite/tests/ghci/scripts/ghci051.stderr
index 3a78849813..130d0012a2 100644
--- a/testsuite/tests/ghci/scripts/ghci051.stderr
+++ b/testsuite/tests/ghci/scripts/ghci051.stderr
@@ -1,5 +1,7 @@
<interactive>:7:9:
- Couldn't match expected type T' with actual type `T'
+ Couldn't match type `T' with `main::Interactive.T'
+ Expected type: T'
+ Actual type: T
In the expression: C :: T'
In an equation for `c': c = C :: T'
diff --git a/testsuite/tests/indexed-types/should_compile/Simple14.stderr b/testsuite/tests/indexed-types/should_compile/Simple14.stderr
index a5250d556f..c86fffe2fe 100644
--- a/testsuite/tests/indexed-types/should_compile/Simple14.stderr
+++ b/testsuite/tests/indexed-types/should_compile/Simple14.stderr
@@ -8,6 +8,8 @@ Simple14.hs:17:12:
`n' is a rigid type variable bound by
the type signature for foo :: EQ_ (Maybe m) (Maybe n)
at Simple14.hs:17:1
+ Expected type: EQ_ z0 z0
+ Actual type: EQ_ m n
In the second argument of `eqE', namely `(eqI :: EQ_ m n)'
In the first argument of `ntI', namely `(`eqE` (eqI :: EQ_ m n))'
In the expression: ntI (`eqE` (eqI :: EQ_ m n))
diff --git a/testsuite/tests/indexed-types/should_compile/T3208b.stderr b/testsuite/tests/indexed-types/should_compile/T3208b.stderr
index 2256e610e3..f8c8db4bcc 100644
--- a/testsuite/tests/indexed-types/should_compile/T3208b.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T3208b.stderr
@@ -6,17 +6,21 @@ T3208b.hs:15:10:
fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
at T3208b.hs:15:1-22
NB: `STerm' is a type function, and may not be injective
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
Expected type: STerm a0
Actual type: OTerm a0
In the expression: fce (apply f)
In an equation for fce': fce' f = fce (apply f)
T3208b.hs:15:15:
- Could not deduce (OTerm a0 ~ STerm a)
+ Could not deduce (STerm a ~ OTerm a0)
from the context (OTerm a ~ STerm a, OBJECT a, SUBST a)
bound by the type signature for
fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
at T3208b.hs:15:1-22
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
In the first argument of `fce', namely `(apply f)'
In the expression: fce (apply f)
In an equation for fce': fce' f = fce (apply f)
diff --git a/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr b/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
index e565aa6cde..6ec39c3daf 100644
--- a/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
+++ b/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
@@ -1,18 +1,18 @@
GADTwrong1.hs:12:19:
- Could not deduce (a1 ~ b)
+ Could not deduce (b ~ a1)
from the context (() ~ Const a1)
bound by a pattern with constructor
T :: forall a. a -> T (Const a),
in a case alternative
at GADTwrong1.hs:12:12-14
+ `b' is a rigid type variable bound by
+ the type signature for coerce :: a -> b at GADTwrong1.hs:11:1
`a1' is a rigid type variable bound by
a pattern with constructor
T :: forall a. a -> T (Const a),
in a case alternative
at GADTwrong1.hs:12:12
- `b' is a rigid type variable bound by
- the type signature for coerce :: a -> b at GADTwrong1.hs:11:1
In the expression: y
In a case alternative: T y -> y
In the expression: case T x :: T (Const b) of { T y -> y }
diff --git a/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr b/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr
index 713afea184..77d93e87ff 100644
--- a/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr
+++ b/testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr
@@ -5,8 +5,8 @@ NoMatchErr.hs:20:5:
bound by the type signature for f :: Fun d => Memo d a -> Memo d a
at NoMatchErr.hs:20:1-15
NB: `Memo' is a type function, and may not be injective
- Expected type: Memo d a
- Actual type: Memo d0 a
+ The type variable `d0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
Expected type: Memo d a -> Memo d a
Actual type: Memo d0 a -> Memo d0 a
In the expression: abst . appl
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr
index 0573e15aea..41812eacf1 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail16.stderr
@@ -1,6 +1,11 @@
-
-SimpleFail16.hs:10:12:
- Couldn't match type `F ()' with `p0 a0'
- In the first argument of `foo', namely `(undefined :: F ())'
- In the expression: foo (undefined :: F ())
- In an equation for `bar': bar = foo (undefined :: F ())
+
+SimpleFail16.hs:10:12:
+ Couldn't match expected type `p0 a0' with actual type `F ()'
+ The type variables `p0', `a0' are ambiguous
+ Possible cause: the monomorphism restriction applied to the following:
+ bar :: p0 a0 (bound at SimpleFail16.hs:10:1)
+ Probable fix: give these definition(s) an explicit type signature
+ or use -XNoMonomorphismRestriction
+ In the first argument of `foo', namely `(undefined :: F ())'
+ In the expression: foo (undefined :: F ())
+ In an equation for `bar': bar = foo (undefined :: F ())
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail5b.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail5b.stderr
index 34e7cab285..bd28918f15 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail5b.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail5b.stderr
@@ -1,6 +1,6 @@
SimpleFail5b.hs:31:12:
- Couldn't match expected type `Int' with actual type `Char'
+ Couldn't match type `Char' with `Int'
Expected type: S3 Int
Actual type: S3 Char
In the pattern: D3Char
diff --git a/testsuite/tests/indexed-types/should_fail/T1897b.stderr b/testsuite/tests/indexed-types/should_fail/T1897b.stderr
index f2f5250b0b..ff0667af2d 100644
--- a/testsuite/tests/indexed-types/should_fail/T1897b.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T1897b.stderr
@@ -1,13 +1,15 @@
-
-T1897b.hs:16:1:
- Could not deduce (Depend a ~ Depend a0)
- from the context (Bug a)
- bound by the inferred type for `isValid':
- Bug a => [Depend a] -> Bool
- at T1897b.hs:16:1-41
- NB: `Depend' is a type function, and may not be injective
- Expected type: [Depend a] -> Bool
- Actual type: [Depend a0] -> Bool
- When checking that `isValid'
- has the inferred type `forall a1. Bug a1 => [Depend a1] -> Bool'
- Probable cause: the inferred type is ambiguous
+
+T1897b.hs:16:1:
+ Could not deduce (Depend a ~ Depend a0)
+ from the context (Bug a)
+ bound by the inferred type for `isValid':
+ Bug a => [Depend a] -> Bool
+ at T1897b.hs:16:1-41
+ NB: `Depend' is a type function, and may not be injective
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Expected type: [Depend a] -> Bool
+ Actual type: [Depend a0] -> Bool
+ When checking that `isValid'
+ has the inferred type `forall a. Bug a => [Depend a] -> Bool'
+ Probable cause: the inferred type is ambiguous
diff --git a/testsuite/tests/indexed-types/should_fail/T1900.stderr b/testsuite/tests/indexed-types/should_fail/T1900.stderr
index 8ea2bb97be..2044c6cab8 100644
--- a/testsuite/tests/indexed-types/should_fail/T1900.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T1900.stderr
@@ -1,18 +1,20 @@
-
-T1900.hs:11:12:
- No instance for (Num ())
- arising from a use of `+'
- Possible fix: add an instance declaration for (Num ())
- In the expression: (+ 1)
- In an equation for `trans': trans = (+ 1)
- In the instance declaration for `Bug Int'
-
-T1900.hs:14:22:
- Could not deduce (Depend s0 ~ Depend s)
- from the context (Bug s)
- bound by the type signature for check :: Bug s => Depend s -> Bool
- at T1900.hs:14:1-22
- NB: `Depend' is a type function, and may not be injective
- In the first argument of `trans', namely `d'
- In the second argument of `(==)', namely `trans d'
- In the expression: d == trans d
+
+T1900.hs:11:12:
+ No instance for (Num ())
+ arising from a use of `+'
+ Possible fix: add an instance declaration for (Num ())
+ In the expression: (+ 1)
+ In an equation for `trans': trans = (+ 1)
+ In the instance declaration for `Bug Int'
+
+T1900.hs:14:22:
+ Could not deduce (Depend s0 ~ Depend s)
+ from the context (Bug s)
+ bound by the type signature for check :: Bug s => Depend s -> Bool
+ at T1900.hs:14:1-22
+ NB: `Depend' is a type function, and may not be injective
+ The type variable `s0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the first argument of `trans', namely `d'
+ In the second argument of `(==)', namely `trans d'
+ In the expression: d == trans d
diff --git a/testsuite/tests/indexed-types/should_fail/T2239.stderr b/testsuite/tests/indexed-types/should_fail/T2239.stderr
index b8d5fc7a36..759ba2babd 100644
--- a/testsuite/tests/indexed-types/should_fail/T2239.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2239.stderr
@@ -1,10 +1,10 @@
T2239.hs:47:13:
- Couldn't match expected type `b -> b'
- with actual type `forall b1. MyEq b1 Bool => b1 -> b1'
- Expected type: (forall b1. MyEq b1 Bool => b1 -> b1) -> b -> b
- Actual type: (forall b1. MyEq b1 Bool => b1 -> b1)
- -> forall b1. MyEq b1 Bool => b1 -> b1
+ Couldn't match type `forall b1. MyEq b1 Bool => b1 -> b1'
+ with `b -> b'
+ Expected type: (forall b. MyEq b Bool => b -> b) -> b -> b
+ Actual type: (forall b. MyEq b Bool => b -> b)
+ -> forall b. MyEq b Bool => b -> b
In the expression:
id ::
(forall b. MyEq b Bool => b -> b)
@@ -16,11 +16,11 @@ T2239.hs:47:13:
-> (forall b. MyEq b Bool => b -> b)
T2239.hs:50:13:
- Couldn't match expected type `b -> b'
- with actual type `forall b1. b1 ~ Bool => b1 -> b1'
- Expected type: (forall b1. b1 ~ Bool => b1 -> b1) -> b -> b
- Actual type: (forall b1. b1 ~ Bool => b1 -> b1)
- -> forall b1. b1 ~ Bool => b1 -> b1
+ Couldn't match type `forall b1. b1 ~ Bool => b1 -> b1'
+ with `b -> b'
+ Expected type: (forall b. b ~ Bool => b -> b) -> b -> b
+ Actual type: (forall b. b ~ Bool => b -> b)
+ -> forall b. b ~ Bool => b -> b
In the expression:
id ::
(forall b. b ~ Bool => b -> b) -> (forall b. b ~ Bool => b -> b)
diff --git a/testsuite/tests/indexed-types/should_fail/T2544.stderr b/testsuite/tests/indexed-types/should_fail/T2544.stderr
index cacd5a3610..b6bc222fa0 100644
--- a/testsuite/tests/indexed-types/should_fail/T2544.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2544.stderr
@@ -1,22 +1,13 @@
-
-T2544.hs:15:12:
- Could not deduce (IxMap r ~ IxMap i1)
- from the context (Ix l, Ix r)
- bound by the instance declaration at T2544.hs:13:10-37
- NB: `IxMap' is a type function, and may not be injective
- Expected type: IxMap (l :|: r) [Int]
- Actual type: BiApp (IxMap i0) (IxMap i1) [Int]
- In the return type of a call of `BiApp'
- In the expression: BiApp empty empty
- In an equation for `empty': empty = BiApp empty empty
-
-T2544.hs:15:12:
- Could not deduce (IxMap l ~ IxMap i0)
- from the context (Ix l, Ix r)
- bound by the instance declaration at T2544.hs:13:10-37
- NB: `IxMap' is a type function, and may not be injective
- Expected type: IxMap (l :|: r) [Int]
- Actual type: BiApp (IxMap i0) (IxMap i1) [Int]
- In the return type of a call of `BiApp'
- In the expression: BiApp empty empty
- In an equation for `empty': empty = BiApp empty empty
+
+T2544.hs:15:12:
+ Could not deduce (IxMap r ~ IxMap i1)
+ from the context (Ix l, Ix r)
+ bound by the instance declaration at T2544.hs:13:10-37
+ NB: `IxMap' is a type function, and may not be injective
+ The type variable `i1' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Expected type: IxMap (l :|: r) [Int]
+ Actual type: BiApp (IxMap i0) (IxMap i1) [Int]
+ In the return type of a call of `BiApp'
+ In the expression: BiApp empty empty
+ In an equation for `empty': empty = BiApp empty empty
diff --git a/testsuite/tests/indexed-types/should_fail/T2664.stderr b/testsuite/tests/indexed-types/should_fail/T2664.stderr
index a4a1a24a85..2b5dd24660 100644
--- a/testsuite/tests/indexed-types/should_fail/T2664.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2664.stderr
@@ -1,18 +1,19 @@
-
-T2664.hs:31:33:
- Could not deduce (Dual b ~ Dual a)
- from the context (Connect a, Connect b)
- bound by the instance declaration at T2664.hs:22:10-52
- or from ((a :*: b) ~ Dual c, c ~ Dual (a :*: b))
- bound by the type signature for
- newPChan :: ((a :*: b) ~ Dual c, c ~ Dual (a :*: b)) =>
- IO (PChan (a :*: b), PChan c)
- at T2664.hs:(23,5)-(31,87)
- NB: `Dual' is a type function, and may not be injective
- Expected type: c
- Actual type: Dual b :+: Dual a
- Expected type: PChan c
- Actual type: PChan (Dual b :+: Dual a)
- In the return type of a call of `E'
- In the expression:
- E (pchoose Right v newPChan) (pchoose Left v newPChan)
+
+T2664.hs:31:33:
+ Could not deduce (Dual b ~ Dual a)
+ from the context (Connect a, Connect b)
+ bound by the instance declaration at T2664.hs:22:10-52
+ or from ((a :*: b) ~ Dual c, c ~ Dual (a :*: b))
+ bound by the type signature for
+ newPChan :: ((a :*: b) ~ Dual c, c ~ Dual (a :*: b)) =>
+ IO (PChan (a :*: b), PChan c)
+ at T2664.hs:(23,5)-(31,87)
+ NB: `Dual' is a type function, and may not be injective
+ Expected type: PChan c
+ Actual type: PChan (Dual b :+: Dual a)
+ In the return type of a call of `E'
+ In the expression:
+ E (pchoose Right v newPChan) (pchoose Left v newPChan)
+ In the first argument of `return', namely
+ `(O $ takeMVar v,
+ E (pchoose Right v newPChan) (pchoose Left v newPChan))'
diff --git a/testsuite/tests/indexed-types/should_fail/T2693.stderr b/testsuite/tests/indexed-types/should_fail/T2693.stderr
index 9bbe1c3b3b..4894b895eb 100644
--- a/testsuite/tests/indexed-types/should_fail/T2693.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2693.stderr
@@ -1,33 +1,16 @@
-
-T2693.hs:10:7:
- Couldn't match type `TFn a' with `TFn a0'
- NB: `TFn' is a type function, and may not be injective
- When checking that `x' has the inferred type `forall a. TFn a'
- Probable cause: the inferred type is ambiguous
- In the expression:
- do { let Just x = ...;
- let n = fst x + fst x;
- return () }
- In an equation for `f':
- f = do { let Just x = ...;
- let n = ...;
- return () }
-
-T2693.hs:18:15:
- Couldn't match type `TFn a3' with `(a2, b0)'
- In the first argument of `fst', namely `x'
- In the first argument of `(+)', namely `fst x'
- In the expression: fst x + snd x
-
-T2693.hs:18:23:
- Couldn't match type `TFn a5' with `(a4, a2)'
- In the first argument of `snd', namely `x'
- In the second argument of `(+)', namely `snd x'
- In the expression: fst x + snd x
-
-T2693.hs:28:20:
- Couldn't match type `TFn a0' with `PVR a1'
- Expected type: () -> Maybe (PVR a1)
- Actual type: () -> Maybe (TFn a0)
- In the first argument of `mapM', namely `g'
- In a stmt of a 'do' block: pvs <- mapM g undefined
+
+T2693.hs:10:7:
+ Couldn't match expected type `TFn a' with actual type `TFn a0'
+ NB: `TFn' is a type function, and may not be injective
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ When checking that `x' has the inferred type `forall a. TFn a'
+ Probable cause: the inferred type is ambiguous
+ In the expression:
+ do { let Just x = ...;
+ let n = fst x + fst x;
+ return () }
+ In an equation for `f':
+ f = do { let Just x = ...;
+ let n = ...;
+ return () }
diff --git a/testsuite/tests/indexed-types/should_fail/T3330a.hs b/testsuite/tests/indexed-types/should_fail/T3330a.hs
index c09eb0fd5c..c13760c6ac 100644
--- a/testsuite/tests/indexed-types/should_fail/T3330a.hs
+++ b/testsuite/tests/indexed-types/should_fail/T3330a.hs
@@ -7,7 +7,9 @@
module T3330a where
-import Control.Monad.Writer
+newtype Writer w a = Writer { runWriter :: (a, w) }
+execWriter :: Writer w a -> w
+execWriter m = snd (runWriter m)
data AnyF (s :: * -> *) = AnyF
class HFunctor (f :: (* -> *) -> * -> *)
diff --git a/testsuite/tests/indexed-types/should_fail/T3330a.stderr b/testsuite/tests/indexed-types/should_fail/T3330a.stderr
index cafc6bcfac..d8b5d2606d 100644
--- a/testsuite/tests/indexed-types/should_fail/T3330a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T3330a.stderr
@@ -1,9 +1,22 @@
-T3330a.hs:17:34:
- Couldn't match type `s' with `(->) (s ix1 -> ix1)'
+T3330a.hs:19:34:
+ Couldn't match type `s' with `(->) (s0 ix1 -> ix1)'
`s' is a rigid type variable bound by
the type signature for children :: s ix -> PF s r ix -> [AnyF s]
- at T3330a.hs:17:1
+ at T3330a.hs:19:1
+ Expected type: (s0 ix0 -> ix1) -> r ix1 -> Writer [AnyF s] (r ix1)
+ Actual type: s ix
In the first argument of `hmapM', namely `p'
In the first argument of `execWriter', namely `(hmapM p collect x)'
In the expression: execWriter (hmapM p collect x)
+
+T3330a.hs:19:36:
+ Couldn't match type `ix' with `r ix0 -> Writer [AnyF s0] (r ix0)'
+ `ix' is a rigid type variable bound by
+ the type signature for children :: s ix -> PF s r ix -> [AnyF s]
+ at T3330a.hs:19:1
+ Expected type: s0 ix0 -> ix
+ Actual type: s0 ix0 -> r ix0 -> Writer [AnyF s0] (r ix0)
+ In the second argument of `hmapM', namely `collect'
+ In the first argument of `execWriter', namely `(hmapM p collect x)'
+ In the expression: execWriter (hmapM p collect x)
diff --git a/testsuite/tests/indexed-types/should_fail/T3330c.stderr b/testsuite/tests/indexed-types/should_fail/T3330c.stderr
index b35db0dcdb..b9db62a887 100644
--- a/testsuite/tests/indexed-types/should_fail/T3330c.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T3330c.stderr
@@ -1,17 +1,20 @@
-T3330c.hs:23:33:
- Kind incompatibility when matching types:
- f0 :: * -> *
- f0 x :: *
- In the return type of a call of `Inl'
- In the expression: Inl (plug rf df x)
- In an equation for plug':
- plug' (RSum rf rg) (Inl df) x = Inl (plug rf df x)
-
T3330c.hs:23:43:
- Couldn't match kind `*' with `* -> *'
- Kind incompatibility when matching types:
- Der ((->) x) :: * -> *
- R :: (* -> *) -> *
+ Could not deduce (f1 ~ t0 x)
+ from the context (f ~ (f1 :+: g))
+ bound by a pattern with constructor
+ RSum :: forall (f :: * -> *) (g :: * -> *).
+ R f -> R g -> R (f :+: g),
+ in an equation for plug'
+ at T3330c.hs:23:8-17
+ `f1' is a rigid type variable bound by
+ a pattern with constructor
+ RSum :: forall (f :: * -> *) (g :: * -> *).
+ R f -> R g -> R (f :+: g),
+ in an equation for plug'
+ at T3330c.hs:23:8
+ Expected type: Der ((->) x) (t0 x)
+ Actual type: R f1
In the first argument of `plug', namely `rf'
In the first argument of `Inl', namely `(plug rf df x)'
+ In the expression: Inl (plug rf df x)
diff --git a/testsuite/tests/indexed-types/should_fail/T3440.stderr b/testsuite/tests/indexed-types/should_fail/T3440.stderr
index fe61b1da65..4e77eef70e 100644
--- a/testsuite/tests/indexed-types/should_fail/T3440.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T3440.stderr
@@ -1,19 +1,19 @@
T3440.hs:11:22:
- Could not deduce (a1 ~ a)
+ Could not deduce (a ~ a1)
from the context (Fam a ~ Fam a1)
bound by a pattern with constructor
GADT :: forall a. a -> Fam a -> GADT (Fam a),
in an equation for `unwrap'
at T3440.hs:11:9-16
+ `a' is a rigid type variable bound by
+ the type signature for unwrap :: GADT (Fam a) -> (a, Fam a)
+ at T3440.hs:11:1
`a1' is a rigid type variable bound by
a pattern with constructor
GADT :: forall a. a -> Fam a -> GADT (Fam a),
in an equation for `unwrap'
at T3440.hs:11:9
- `a' is a rigid type variable bound by
- the type signature for unwrap :: GADT (Fam a) -> (a, Fam a)
- at T3440.hs:11:1
In the expression: x
In the expression: (x, y)
In an equation for `unwrap': unwrap (GADT x y) = (x, y)
diff --git a/testsuite/tests/indexed-types/should_fail/T4099.stderr b/testsuite/tests/indexed-types/should_fail/T4099.stderr
index 926579de74..3512e321bd 100644
--- a/testsuite/tests/indexed-types/should_fail/T4099.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4099.stderr
@@ -1,13 +1,17 @@
-
-T4099.hs:11:14:
- Couldn't match type `T b' with `T a0'
- NB: `T' is a type function, and may not be injective
- In the first argument of `foo', namely `x'
- In the expression: foo x
- In an equation for `bar1': bar1 x = foo x
-
-T4099.hs:14:14:
- Couldn't match type `T a1' with `Maybe b'
- In the first argument of `foo', namely `x'
- In the expression: foo x
- In an equation for `bar2': bar2 x = foo x
+
+T4099.hs:11:14:
+ Couldn't match expected type `T a0' with actual type `T b'
+ NB: `T' is a type function, and may not be injective
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the first argument of `foo', namely `x'
+ In the expression: foo x
+ In an equation for `bar1': bar1 x = foo x
+
+T4099.hs:14:14:
+ Couldn't match expected type `T a1' with actual type `Maybe b'
+ The type variable `a1' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the first argument of `foo', namely `x'
+ In the expression: foo x
+ In an equation for `bar2': bar2 x = foo x
diff --git a/testsuite/tests/indexed-types/should_fail/T4174.stderr b/testsuite/tests/indexed-types/should_fail/T4174.stderr
index 2a403786d9..81fb603dd8 100644
--- a/testsuite/tests/indexed-types/should_fail/T4174.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4174.stderr
@@ -1,5 +1,7 @@
T4174.hs:42:12:
Couldn't match type `False' with `True'
+ Expected type: True
+ Actual type: GHCVersion (WayOf m) :>=: GHC6'10 Minor1
In the expression: sync_large_objects
In an equation for `testcase': testcase = sync_large_objects
diff --git a/testsuite/tests/indexed-types/should_fail/T4179.stderr b/testsuite/tests/indexed-types/should_fail/T4179.stderr
index 1903d7caf3..021e73e413 100644
--- a/testsuite/tests/indexed-types/should_fail/T4179.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4179.stderr
@@ -1,24 +1,5 @@
T4179.hs:26:16:
- Could not deduce (DoC (x (A2 (x (Con x)) -> A3 (x (Con x)))))
- arising from a use of `op'
- from the context (Functor x, DoC (FCon x))
- bound by the type signature for
- fCon :: (Functor x, DoC (FCon x)) =>
- Con x -> A2 (FCon x) -> A3 (FCon x)
- at T4179.hs:26:1-17
- Possible fix:
- add (DoC (x (A2 (x (Con x)) -> A3 (x (Con x))))) to the context of
- the type signature for
- fCon :: (Functor x, DoC (FCon x)) =>
- Con x -> A2 (FCon x) -> A3 (FCon x)
- or add an instance declaration for
- (DoC (x (A2 (x (Con x)) -> A3 (x (Con x)))))
- In the first argument of `foldDoC', namely `op'
- In the expression: foldDoC op
- In an equation for `fCon': fCon = foldDoC op
-
-T4179.hs:26:16:
Could not deduce (A3 (x (A2 (x (Con x)) -> A3 (x (Con x))))
~ A3 (x (Con x)))
from the context (Functor x, DoC (FCon x))
@@ -27,29 +8,6 @@ T4179.hs:26:16:
Con x -> A2 (FCon x) -> A3 (FCon x)
at T4179.hs:26:1-17
NB: `A3' is a type function, and may not be injective
- Expected type: A2 (x (Con x)) -> A3 (x (Con x))
- Actual type: A2 (x (A2 (x (Con x)) -> A3 (x (Con x))))
- -> A3 (x (A2 (x (Con x)) -> A3 (x (Con x))))
- Expected type: x (A2 (x (Con x)) -> A3 (x (Con x)))
- -> A2 (x (Con x)) -> A3 (x (Con x))
- Actual type: x (A2 (x (Con x)) -> A3 (x (Con x)))
- -> A2 (x (A2 (x (Con x)) -> A3 (x (Con x))))
- -> A3 (x (A2 (x (Con x)) -> A3 (x (Con x))))
- In the first argument of `foldDoC', namely `op'
- In the expression: foldDoC op
-
-T4179.hs:26:16:
- Could not deduce (A2 (x (A2 (x (Con x)) -> A3 (x (Con x))))
- ~ A2 (x (Con x)))
- from the context (Functor x, DoC (FCon x))
- bound by the type signature for
- fCon :: (Functor x, DoC (FCon x)) =>
- Con x -> A2 (FCon x) -> A3 (FCon x)
- at T4179.hs:26:1-17
- NB: `A2' is a type function, and may not be injective
- Expected type: A2 (x (Con x)) -> A3 (x (Con x))
- Actual type: A2 (x (A2 (x (Con x)) -> A3 (x (Con x))))
- -> A3 (x (A2 (x (Con x)) -> A3 (x (Con x))))
Expected type: x (A2 (x (Con x)) -> A3 (x (Con x)))
-> A2 (x (Con x)) -> A3 (x (Con x))
Actual type: x (A2 (x (Con x)) -> A3 (x (Con x)))
@@ -57,3 +15,4 @@ T4179.hs:26:16:
-> A3 (x (A2 (x (Con x)) -> A3 (x (Con x))))
In the first argument of `foldDoC', namely `op'
In the expression: foldDoC op
+ In an equation for `fCon': fCon = foldDoC op
diff --git a/testsuite/tests/indexed-types/should_fail/T4272.hs b/testsuite/tests/indexed-types/should_fail/T4272.hs
index 3370fc3637..d9fd6d9724 100644
--- a/testsuite/tests/indexed-types/should_fail/T4272.hs
+++ b/testsuite/tests/indexed-types/should_fail/T4272.hs
@@ -10,7 +10,7 @@ class Family (TermFamily a) => TermLike a where
laws :: forall a b. TermLike a => TermFamily a a -> b
laws t = prune t (terms (undefined :: TermFamily a a))
-prune :: TermLike a => TermFamily a a -> TermFamily a a -> b
+prune :: TermLike x => TermFamily x x -> TermFamily x x -> b
prune = undefined
-- terms :: Family f => f a -> a
diff --git a/testsuite/tests/indexed-types/should_fail/T4272.stderr b/testsuite/tests/indexed-types/should_fail/T4272.stderr
index 5c6e38f0ae..0a6b3be8ff 100644
--- a/testsuite/tests/indexed-types/should_fail/T4272.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4272.stderr
@@ -1,8 +1,37 @@
-
-T4272.hs:11:16:
- Occurs check: cannot construct the infinite type:
- a0 = TermFamily a0 a0
- In the first argument of `prune', namely `t'
- In the expression: prune t (terms (undefined :: TermFamily a a))
- In an equation for `laws':
- laws t = prune t (terms (undefined :: TermFamily a a))
+
+T4272.hs:11:16:
+ Couldn't match type `TermFamily (TermFamily x0 x0)'
+ with `TermFamily x0'
+ NB: `TermFamily' is a type function, and may not be injective
+ The type variable `x0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Expected type: TermFamily x0 x0
+ Actual type: TermFamily a a
+ In the first argument of `prune', namely `t'
+ In the expression: prune t (terms (undefined :: TermFamily a a))
+ In an equation for `laws':
+ laws t = prune t (terms (undefined :: TermFamily a a))
+
+T4272.hs:11:16:
+ Occurs check: cannot construct the infinite type:
+ x0 = TermFamily x0 x0
+ Expected type: TermFamily x0 x0
+ Actual type: TermFamily a a
+ In the first argument of `prune', namely `t'
+ In the expression: prune t (terms (undefined :: TermFamily a a))
+ In an equation for `laws':
+ laws t = prune t (terms (undefined :: TermFamily a a))
+
+T4272.hs:11:19:
+ Could not deduce (a ~ TermFamily x0 x0)
+ from the context (TermLike a)
+ bound by the type signature for
+ laws :: TermLike a => TermFamily a a -> b
+ at T4272.hs:11:1-54
+ `a' is a rigid type variable bound by
+ the type signature for laws :: TermLike a => TermFamily a a -> b
+ at T4272.hs:11:1
+ In the return type of a call of `terms'
+ In the second argument of `prune', namely
+ `(terms (undefined :: TermFamily a a))'
+ In the expression: prune t (terms (undefined :: TermFamily a a))
diff --git a/testsuite/tests/indexed-types/should_fail/T4485.stderr b/testsuite/tests/indexed-types/should_fail/T4485.stderr
index d8ebccb28a..21811da390 100644
--- a/testsuite/tests/indexed-types/should_fail/T4485.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4485.stderr
@@ -1,19 +1,29 @@
-
-T4485.hs:47:15:
- Overlapping instances for EmbedAsChild
- (IdentityT IO) (XMLGenT m0 (XML m0))
- arising from a use of `asChild'
- Matching instances:
- instance [overlap ok] (EmbedAsChild m c, m1 ~ m) =>
- EmbedAsChild m (XMLGenT m1 c)
- -- Defined at T4485.hs:29:10
- instance [overlap ok] EmbedAsChild
- (IdentityT IO) (XMLGenT Identity ())
- -- Defined at T4485.hs:42:10
- (The choice depends on the instantiation of `m0'
- To pick the first instance above, use -XIncoherentInstances
- when compiling the other instance declarations)
- In the expression: asChild
- In the expression: asChild $ (genElement "foo")
- In an equation for `asChild':
- asChild b = asChild $ (genElement "foo")
+
+T4485.hs:47:15:
+ Overlapping instances for EmbedAsChild
+ (IdentityT IO) (XMLGenT m0 (XML m0))
+ arising from a use of `asChild'
+ Matching instances:
+ instance [overlap ok] (EmbedAsChild m c, m1 ~ m) =>
+ EmbedAsChild m (XMLGenT m1 c)
+ -- Defined at T4485.hs:29:10
+ instance [overlap ok] EmbedAsChild
+ (IdentityT IO) (XMLGenT Identity ())
+ -- Defined at T4485.hs:42:10
+ (The choice depends on the instantiation of `m0'
+ To pick the first instance above, use -XIncoherentInstances
+ when compiling the other instance declarations)
+ In the expression: asChild
+ In the expression: asChild $ (genElement "foo")
+ In an equation for `asChild':
+ asChild b = asChild $ (genElement "foo")
+
+T4485.hs:47:26:
+ No instance for (XMLGen m0)
+ arising from a use of `genElement'
+ The type variable `m0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ In the second argument of `($)', namely `(genElement "foo")'
+ In the expression: asChild $ (genElement "foo")
+ In an equation for `asChild':
+ asChild b = asChild $ (genElement "foo")
diff --git a/testsuite/tests/indexed-types/should_fail/T5439.stderr b/testsuite/tests/indexed-types/should_fail/T5439.stderr
index 6f4a9c9c1e..4d8742c955 100644
--- a/testsuite/tests/indexed-types/should_fail/T5439.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T5439.stderr
@@ -1,4 +1,14 @@
+T5439.hs:83:28:
+ Couldn't match type `Attempt (WaitOpResult (WaitOps rs))'
+ with `Attempt (HNth n0 l0) -> Attempt (HElemOf l0)'
+ Expected type: f (Attempt (HNth n0 l0) -> Attempt (HElemOf l0))
+ Actual type: f (Attempt (WaitOpResult (WaitOps rs)))
+ In the first argument of `complete', namely `ev'
+ In the expression: complete ev
+ In a stmt of a 'do' block:
+ c <- complete ev $ inj $ Failure (e :: SomeException)
+
T5439.hs:83:39:
Couldn't match expected type `Peano n0'
with actual type `Attempt α0'
diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T
index 4f0b077bdf..1f8f99ac23 100644
--- a/testsuite/tests/indexed-types/should_fail/all.T
+++ b/testsuite/tests/indexed-types/should_fail/all.T
@@ -56,7 +56,7 @@ test('T4272', normal, compile_fail, [''])
test('T4246', normal, compile_fail, [''])
test('T4093a', normal, compile_fail, [''])
test('T4093b', normal, compile_fail, [''])
-test('T3330a', reqlib('mtl'), compile_fail, [''])
+test('T3330a', normal, compile_fail, [''])
test('T3330b', normal, compile_fail, [''])
test('T3330c', normal, compile_fail, [''])
test('T4179', normal, compile_fail, [''])
@@ -72,4 +72,5 @@ test('T2544', normal, compile_fail, [''])
test('T1897b', normal, compile_fail, [''])
test('T5439', normal, compile_fail, [''])
test('T5515', normal, compile_fail, [''])
+test('T5763', expect_broken(5673), compile_fail, [''])
diff --git a/testsuite/tests/layout/layout001.stdout b/testsuite/tests/layout/layout001.stdout
index be1cd62b20..4273843584 100644
--- a/testsuite/tests/layout/layout001.stdout
+++ b/testsuite/tests/layout/layout001.stdout
@@ -4,6 +4,6 @@ Running with -XAlternativeLayoutRule
layout001.hs:6:3: parse error on input `where'
Running with -XAlternativeLayoutRule -XAlternativeLayoutRuleTransitional
-layout001.hs:6:3:
+layout001.hs:6:3: Warning:
transitional layout will not be accepted in the future:
`where' clause at the same depth as implicit layout block
diff --git a/testsuite/tests/layout/layout003.stdout b/testsuite/tests/layout/layout003.stdout
index e40bac2077..1eb86386e3 100644
--- a/testsuite/tests/layout/layout003.stdout
+++ b/testsuite/tests/layout/layout003.stdout
@@ -4,6 +4,6 @@ Running with -XAlternativeLayoutRule
layout003.hs:11:4: parse error on input `|'
Running with -XAlternativeLayoutRule -XAlternativeLayoutRuleTransitional
-layout003.hs:11:4:
+layout003.hs:11:4: Warning:
transitional layout will not be accepted in the future:
`|' at the same depth as implicit layout block
diff --git a/testsuite/tests/layout/layout006.stdout b/testsuite/tests/layout/layout006.stdout
index ab33a6e1fe..84704ba1ab 100644
--- a/testsuite/tests/layout/layout006.stdout
+++ b/testsuite/tests/layout/layout006.stdout
@@ -4,6 +4,6 @@ Running with -XAlternativeLayoutRule
layout006.hs:12:2: parse error on input `|'
Running with -XAlternativeLayoutRule -XAlternativeLayoutRuleTransitional
-layout006.hs:12:2:
+layout006.hs:12:2: Warning:
transitional layout will not be accepted in the future:
`|' at the same depth as implicit layout block
diff --git a/testsuite/tests/parser/should_compile/read064.stderr b/testsuite/tests/parser/should_compile/read064.stderr
index 8ed04fc629..dfc662f422 100644
--- a/testsuite/tests/parser/should_compile/read064.stderr
+++ b/testsuite/tests/parser/should_compile/read064.stderr
@@ -1,2 +1,2 @@
-read064.hs:4:1: Unrecognised pragma
+read064.hs:4:1: Warning: Unrecognised pragma
diff --git a/testsuite/tests/parser/should_compile/read066.stderr b/testsuite/tests/parser/should_compile/read066.stderr
index a094133754..3eca28b785 100644
--- a/testsuite/tests/parser/should_compile/read066.stderr
+++ b/testsuite/tests/parser/should_compile/read066.stderr
@@ -1,2 +1,2 @@
-read066.hs:2:1: Unrecognised pragma
+read066.hs:2:1: Warning: Unrecognised pragma
diff --git a/testsuite/tests/rebindable/DoParamM.stderr b/testsuite/tests/rebindable/DoParamM.stderr
index 7c095445e1..09d2370737 100644
--- a/testsuite/tests/rebindable/DoParamM.stderr
+++ b/testsuite/tests/rebindable/DoParamM.stderr
@@ -6,20 +6,29 @@ DoParamM.hs:146:25:
In a stmt of a 'do' block: return (v == v')
DoParamM.hs:286:28:
- Couldn't match expected type `Locked' with actual type `Unlocked'
- Expected type: LIO Locked r0 b0
+ Couldn't match type `Unlocked' with `Locked'
+ Expected type: LIO Locked Locked ()
Actual type: LIO Unlocked Locked ()
In a stmt of a 'do' block: tlock2_do
In the expression:
do { tlock2_do;
tlock2_do }
+ In an equation for `tlock4_do':
+ tlock4_do
+ = do { tlock2_do;
+ tlock2_do }
DoParamM.hs:302:37:
- Couldn't match expected type `Unlocked' with actual type `Locked'
- Expected type: LIO Unlocked r0 b0
+ Couldn't match type `Locked' with `Unlocked'
+ Expected type: LIO Unlocked Unlocked ()
Actual type: LIO Locked Unlocked ()
In a stmt of a 'do' block: unlock
In the expression:
do { tlock2_do;
unlock;
unlock }
+ In an equation for `tlock4'_do':
+ tlock4'_do
+ = do { tlock2_do;
+ unlock;
+ unlock }
diff --git a/testsuite/tests/rebindable/rebindable6.stderr b/testsuite/tests/rebindable/rebindable6.stderr
index d451400514..d38e53dbff 100644
--- a/testsuite/tests/rebindable/rebindable6.stderr
+++ b/testsuite/tests/rebindable/rebindable6.stderr
@@ -2,6 +2,8 @@
rebindable6.hs:106:17:
No instance for (HasSeq (IO a -> t0 -> IO b))
arising from a do statement
+ The type variable `t0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
Possible fix:
add an instance declaration for (HasSeq (IO a -> t0 -> IO b))
In a stmt of a 'do' block: f
@@ -16,27 +18,15 @@ rebindable6.hs:106:17:
return b }
rebindable6.hs:107:17:
- No instance for (HasFail ([Prelude.Char] -> t1))
+ No instances for (HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0),
+ HasFail ([Prelude.Char] -> t1))
arising from a do statement
+ The type variables `t0', `t1' are ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
Possible fix:
- add an instance declaration for (HasFail ([Prelude.Char] -> t1))
- In a stmt of a 'do' block: Just (b :: b) <- g
- In the expression:
- do { f;
- Just (b :: b) <- g;
- return b }
- In an equation for `test_do':
- test_do f g
- = do { f;
- Just (b :: b) <- g;
- return b }
-
-rebindable6.hs:107:17:
- No instance for (HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0))
- arising from a do statement
- Possible fix:
- add an instance declaration for
- (HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0))
+ add instance declarations for
+ (HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0),
+ HasFail ([Prelude.Char] -> t1))
In a stmt of a 'do' block: Just (b :: b) <- g
In the expression:
do { f;
@@ -51,6 +41,8 @@ rebindable6.hs:107:17:
rebindable6.hs:108:17:
No instance for (HasReturn (b -> t1))
arising from a use of `return'
+ The type variable `t1' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
Possible fix: add an instance declaration for (HasReturn (b -> t1))
In a stmt of a 'do' block: return b
In the expression:
diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr b/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr
index fdcc5997d5..33a66e6267 100644
--- a/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr
+++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang03.stderr
@@ -1,4 +1,4 @@
-SafeLang03.hs:7:11:
+SafeLang03.hs:7:11: Warning:
Rule "f" ignored
User defined rules are disabled under Safe Haskell
diff --git a/testsuite/tests/simplCore/should_compile/simpl017.stderr b/testsuite/tests/simplCore/should_compile/simpl017.stderr
index 325920fd57..497bc8b51a 100644
--- a/testsuite/tests/simplCore/should_compile/simpl017.stderr
+++ b/testsuite/tests/simplCore/should_compile/simpl017.stderr
@@ -1,20 +1,28 @@
-
-simpl017.hs:44:12:
- Couldn't match expected type `forall v. [E m i] -> E' v m a'
- with actual type `[E m i] -> E' v0 m a'
- In the first argument of `return', namely `f'
- In a stmt of a 'do' block: return f
- In the first argument of `E', namely
- `(do { let ix :: [E m i] -> m i
- ix [i] = runE i
- {-# INLINE f #-}
- ....;
- return f })'
-
-simpl017.hs:63:5:
- Couldn't match expected type `t0 -> t1'
- with actual type `forall v. [E m0 Int] -> E' v m0 Int'
- The function `a' is applied to one argument,
- but its type `forall v. [E m0 Int] -> E' v m0 Int' has none
- In the first argument of `plus', namely `a [one]'
- In a stmt of a 'do' block: a [one] `plus` a [one]
+
+simpl017.hs:44:12:
+ Couldn't match expected type `forall v. [E m i] -> E' v m a'
+ with actual type `[E m i] -> E' v0 m a'
+ In the first argument of `return', namely `f'
+ In a stmt of a 'do' block: return f
+ In the first argument of `E', namely
+ `(do { let ix :: [E m i] -> m i
+ ix [i] = runE i
+ {-# INLINE f #-}
+ ....;
+ return f })'
+
+simpl017.hs:63:5:
+ Couldn't match expected type `[E (ST t0) Int] -> E (ST s) Int'
+ with actual type `forall v. [E (ST s) Int] -> E' v (ST s) Int'
+ The function `a' is applied to one argument,
+ but its type `forall v. [E (ST s) Int] -> E' v (ST s) Int' has none
+ In the first argument of `plus', namely `a [one]'
+ In a stmt of a 'do' block: a [one] `plus` a [one]
+
+simpl017.hs:63:19:
+ Couldn't match expected type `[E (ST t1) Int] -> E (ST s) Int'
+ with actual type `forall v. [E (ST s) Int] -> E' v (ST s) Int'
+ The function `a' is applied to one argument,
+ but its type `forall v. [E (ST s) Int] -> E' v (ST s) Int' has none
+ In the second argument of `plus', namely `a [one]'
+ In a stmt of a 'do' block: a [one] `plus` a [one]
diff --git a/testsuite/tests/th/T5358.stderr b/testsuite/tests/th/T5358.stderr
index 4a1bfbd5fe..01f1ffa608 100644
--- a/testsuite/tests/th/T5358.stderr
+++ b/testsuite/tests/th/T5358.stderr
@@ -1,15 +1,24 @@
T5358.hs:7:1:
+ Couldn't match expected type `t1 -> t1' with actual type `Int'
The equation(s) for `t1' have one argument,
but its type `Int' has none
T5358.hs:8:1:
+ Couldn't match expected type `t0 -> t0' with actual type `Int'
The equation(s) for `t2' have one argument,
but its type `Int' has none
T5358.hs:10:13:
+ Couldn't match expected type `t0 -> a0' with actual type `Int'
The function `t1' is applied to one argument,
but its type `Int' has none
In the first argument of `(==)', namely `t1 x'
In the expression: t1 x == t2 x
- In an equation for `prop_x1': prop_x1 x = t1 x == t2 x
+
+T5358.hs:10:21:
+ Couldn't match expected type `t0 -> a0' with actual type `Int'
+ The function `t2' is applied to one argument,
+ but its type `Int' has none
+ In the second argument of `(==)', namely `t2 x'
+ In the expression: t1 x == t2 x
diff --git a/testsuite/tests/th/TH_reifyDecl1.hs b/testsuite/tests/th/TH_reifyDecl1.hs
index 9c0880b2af..f2f5dd8b0e 100644
--- a/testsuite/tests/th/TH_reifyDecl1.hs
+++ b/testsuite/tests/th/TH_reifyDecl1.hs
@@ -3,6 +3,7 @@
{-# LANGUAGE TypeFamilies #-}
module TH_reifyDecl1 where
+import System.IO
import Language.Haskell.TH
import Text.PrettyPrint.HughesPJ
@@ -62,7 +63,7 @@ data instance DF2 Bool = DBool
test :: ()
test = $(let
display :: Name -> Q ()
- display q = do { i <- reify q; report False (pprint i) }
+ display q = do { i <- reify q; runIO $ hPutStrLn stderr (pprint i) }
in do { display ''T
; display ''R
; display ''List
diff --git a/testsuite/tests/th/TH_reifyDecl1.stderr b/testsuite/tests/th/TH_reifyDecl1.stderr
index 7f4ae8550f..82a4f572ce 100644
--- a/testsuite/tests/th/TH_reifyDecl1.stderr
+++ b/testsuite/tests/th/TH_reifyDecl1.stderr
@@ -1,67 +1,35 @@
-
-TH_reifyDecl1.hs:63:10:
- data TH_reifyDecl1.T = TH_reifyDecl1.A | TH_reifyDecl1.B
-
-TH_reifyDecl1.hs:63:10:
- data TH_reifyDecl1.R a_0 = TH_reifyDecl1.C a_0 | TH_reifyDecl1.D
-
-TH_reifyDecl1.hs:63:10:
- data TH_reifyDecl1.List a_0
+data TH_reifyDecl1.T = TH_reifyDecl1.A | TH_reifyDecl1.B
+data TH_reifyDecl1.R a_0 = TH_reifyDecl1.C a_0 | TH_reifyDecl1.D
+data TH_reifyDecl1.List a_0
= TH_reifyDecl1.Nil
| TH_reifyDecl1.Cons a_0 (TH_reifyDecl1.List a_0)
-
-TH_reifyDecl1.hs:63:10:
- data TH_reifyDecl1.Tree a_0
+data TH_reifyDecl1.Tree a_0
= TH_reifyDecl1.Leaf
| (TH_reifyDecl1.Tree a_0) TH_reifyDecl1.:+: (TH_reifyDecl1.Tree a_0)
-
-TH_reifyDecl1.hs:63:10:
- type TH_reifyDecl1.IntList = [GHC.Types.Int]
-
-TH_reifyDecl1.hs:63:10:
- newtype TH_reifyDecl1.Length = TH_reifyDecl1.Length GHC.Types.Int
-
-TH_reifyDecl1.hs:63:10:
- Constructor from TH_reifyDecl1.Tree: TH_reifyDecl1.Leaf :: forall a_0 . TH_reifyDecl1.Tree a_0
-
-TH_reifyDecl1.hs:63:10:
- Class op from TH_reifyDecl1.C1: TH_reifyDecl1.m1 :: forall a_0 . TH_reifyDecl1.C1 a_0 =>
+type TH_reifyDecl1.IntList = [GHC.Types.Int]
+newtype TH_reifyDecl1.Length = TH_reifyDecl1.Length GHC.Types.Int
+Constructor from TH_reifyDecl1.Tree: TH_reifyDecl1.Leaf :: forall a_0 . TH_reifyDecl1.Tree a_0
+Class op from TH_reifyDecl1.C1: TH_reifyDecl1.m1 :: forall a_0 . TH_reifyDecl1.C1 a_0 =>
a_0 -> GHC.Types.Int
infixl 3 TH_reifyDecl1.m1
-
-TH_reifyDecl1.hs:63:10:
- class TH_reifyDecl1.C1 a_0
+class TH_reifyDecl1.C1 a_0
where TH_reifyDecl1.m1 :: forall a_0 . TH_reifyDecl1.C1 a_0 =>
a_0 -> GHC.Types.Int
-
-TH_reifyDecl1.hs:63:10:
- class TH_reifyDecl1.C2 a_0
+class TH_reifyDecl1.C2 a_0
where TH_reifyDecl1.m2 :: forall a_0 . TH_reifyDecl1.C2 a_0 =>
a_0 -> GHC.Types.Int
instance TH_reifyDecl1.C2 GHC.Types.Int
-
-TH_reifyDecl1.hs:63:10:
- class TH_reifyDecl1.C3 a_0
+class TH_reifyDecl1.C3 a_0
instance TH_reifyDecl1.C3 GHC.Types.Int
-
-TH_reifyDecl1.hs:63:10:
- type family TH_reifyDecl1.AT1 a_0 :: * -> *
+type family TH_reifyDecl1.AT1 a_0 :: * -> *
type instance TH_reifyDecl1.AT1 GHC.Types.Int = GHC.Types.Bool
-
-TH_reifyDecl1.hs:63:10:
- data family TH_reifyDecl1.AT2 a_0 :: * -> *
+data family TH_reifyDecl1.AT2 a_0 :: * -> *
data instance TH_reifyDecl1.AT2 GHC.Types.Int
= TH_reifyDecl1.AT2Int
-
-TH_reifyDecl1.hs:63:10: type family TH_reifyDecl1.TF1 a_0 :: * -> *
-
-TH_reifyDecl1.hs:63:10:
- type family TH_reifyDecl1.TF2 a_0 :: * -> *
+type family TH_reifyDecl1.TF1 a_0 :: * -> *
+type family TH_reifyDecl1.TF2 a_0 :: * -> *
type instance TH_reifyDecl1.TF2 GHC.Types.Bool = GHC.Types.Bool
-
-TH_reifyDecl1.hs:63:10: data family TH_reifyDecl1.DF1 a_0 :: * -> *
-
-TH_reifyDecl1.hs:63:10:
- data family TH_reifyDecl1.DF2 a_0 :: * -> *
+data family TH_reifyDecl1.DF1 a_0 :: * -> *
+data family TH_reifyDecl1.DF2 a_0 :: * -> *
data instance TH_reifyDecl1.DF2 GHC.Types.Bool
= TH_reifyDecl1.DBool
diff --git a/testsuite/tests/th/TH_reifyMkName.hs b/testsuite/tests/th/TH_reifyMkName.hs
index c5d5ebeea9..7c4d7196e0 100644
--- a/testsuite/tests/th/TH_reifyMkName.hs
+++ b/testsuite/tests/th/TH_reifyMkName.hs
@@ -2,12 +2,13 @@
module Foo where
+import System.IO
import Language.Haskell.TH
type C = Int
$(do
a <- reify $ mkName "C"
- report False $ show a
+ runIO $ hPutStrLn stderr (show a)
return []
)
diff --git a/testsuite/tests/th/TH_reifyMkName.stderr b/testsuite/tests/th/TH_reifyMkName.stderr
index 0537f1ddcf..a82707f987 100644
--- a/testsuite/tests/th/TH_reifyMkName.stderr
+++ b/testsuite/tests/th/TH_reifyMkName.stderr
@@ -1,3 +1 @@
-
-TH_reifyMkName.hs:9:3:
- TyConI (TySynD Foo.C [] (ConT GHC.Types.Int))
+TyConI (TySynD Foo.C [] (ConT GHC.Types.Int))
diff --git a/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr-ghc b/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr-ghc
index ea4c0e88f6..04d55b4447 100644
--- a/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr-ghc
+++ b/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr-ghc
@@ -1,4 +1,4 @@
-
-B.hs:7:10:
- Warning: No explicit method nor default method for `row'
- In the instance declaration for `Matrix Bool Val'
+
+B.hs:7:10:
+ Warning: No explicit method or default declaration for `row'
+ In the instance declaration for `Matrix Bool Val'
diff --git a/testsuite/tests/typecheck/should_compile/FD2.stderr b/testsuite/tests/typecheck/should_compile/FD2.stderr
index 4dd98e2c77..2b2fee3eb9 100644
--- a/testsuite/tests/typecheck/should_compile/FD2.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD2.stderr
@@ -1,25 +1,25 @@
-
-FD2.hs:26:36:
- Could not deduce (e1 ~ e)
- from the context (Foldable a)
- bound by the class declaration for `Foldable'
- at FD2.hs:(17,1)-(26,39)
- or from (Elem a e)
- bound by the type signature for
- foldr1 :: Elem a e => (e -> e -> e) -> a -> e
- at FD2.hs:(22,3)-(26,39)
- or from (Elem a e1)
- bound by the type signature for
- mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
- at FD2.hs:(25,12)-(26,39)
- `e1' is a rigid type variable bound by
- the type signature for
- mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
- at FD2.hs:25:12
- `e' is a rigid type variable bound by
- the type signature for
- foldr1 :: Elem a e => (e -> e -> e) -> a -> e
- at FD2.hs:22:3
- In the first argument of `f', namely `x'
- In the first argument of `Just', namely `(f x y)'
- In the expression: Just (f x y)
+
+FD2.hs:26:36:
+ Could not deduce (e ~ e1)
+ from the context (Foldable a)
+ bound by the class declaration for `Foldable'
+ at FD2.hs:(17,1)-(26,39)
+ or from (Elem a e)
+ bound by the type signature for
+ foldr1 :: Elem a e => (e -> e -> e) -> a -> e
+ at FD2.hs:(22,3)-(26,39)
+ or from (Elem a e1)
+ bound by the type signature for
+ mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
+ at FD2.hs:(25,12)-(26,39)
+ `e' is a rigid type variable bound by
+ the type signature for
+ foldr1 :: Elem a e => (e -> e -> e) -> a -> e
+ at FD2.hs:22:3
+ `e1' is a rigid type variable bound by
+ the type signature for
+ mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
+ at FD2.hs:25:12
+ In the first argument of `f', namely `x'
+ In the first argument of `Just', namely `(f x y)'
+ In the expression: Just (f x y)
diff --git a/testsuite/tests/typecheck/should_compile/T2494.stderr b/testsuite/tests/typecheck/should_compile/T2494.stderr
index 5e5661e74a..765858e198 100644
--- a/testsuite/tests/typecheck/should_compile/T2494.stderr
+++ b/testsuite/tests/typecheck/should_compile/T2494.stderr
@@ -1,22 +1,24 @@
-
-T2494.hs:15:7:
- Couldn't match type `b' with `a'
- `b' is a rigid type variable bound by
- the RULE "foo/foo" at T2494.hs:14:46
- `a' is a rigid type variable bound by
- the RULE "foo/foo" at T2494.hs:13:46
- Expected type: Maybe (m b) -> Maybe (m b)
- Actual type: Maybe (m a) -> Maybe (m a)
- In the first argument of `foo', namely `f'
- In the expression: foo f (foo g x)
-
-T2494.hs:15:30:
- Couldn't match type `b' with `a'
- `b' is a rigid type variable bound by
- the RULE "foo/foo" at T2494.hs:14:46
- `a' is a rigid type variable bound by
- the RULE "foo/foo" at T2494.hs:13:46
- Expected type: Maybe (m b) -> Maybe (m a)
- Actual type: Maybe (m b) -> Maybe (m b)
- In the second argument of `(.)', namely `g'
- In the first argument of `foo', namely `(f . g)'
+
+T2494.hs:15:7:
+ Couldn't match type `b' with `a'
+ `b' is a rigid type variable bound by
+ the RULE "foo/foo" at T2494.hs:14:46
+ `a' is a rigid type variable bound by
+ the RULE "foo/foo" at T2494.hs:13:46
+ Expected type: Maybe (m b) -> Maybe (m b)
+ Actual type: Maybe (m a) -> Maybe (m a)
+ In the first argument of `foo', namely `f'
+ In the expression: foo f (foo g x)
+ When checking the transformation rule "foo/foo"
+
+T2494.hs:15:30:
+ Couldn't match type `b' with `a'
+ `b' is a rigid type variable bound by
+ the RULE "foo/foo" at T2494.hs:14:46
+ `a' is a rigid type variable bound by
+ the RULE "foo/foo" at T2494.hs:13:46
+ Expected type: Maybe (m b) -> Maybe (m a)
+ Actual type: Maybe (m b) -> Maybe (m b)
+ In the second argument of `(.)', namely `g'
+ In the first argument of `foo', namely `(f . g)'
+ In the expression: foo (f . g) x
diff --git a/testsuite/tests/typecheck/should_compile/T4912.stderr b/testsuite/tests/typecheck/should_compile/T4912.stderr
index c944dc1260..50d2deb3cd 100644
--- a/testsuite/tests/typecheck/should_compile/T4912.stderr
+++ b/testsuite/tests/typecheck/should_compile/T4912.stderr
@@ -1,4 +1,4 @@
-T4912.hs:10:10: Warning: orphan instance: instance Foo TheirData
+T4912.hs:10:10: Warning: Orphan instance: instance Foo TheirData
-T4912.hs:13:10: Warning: orphan instance: instance Bar OurData
+T4912.hs:13:10: Warning: Orphan instance: instance Bar OurData
diff --git a/testsuite/tests/typecheck/should_compile/tc168.stderr b/testsuite/tests/typecheck/should_compile/tc168.stderr
index 3a97b3f097..cbaa0aceeb 100644
--- a/testsuite/tests/typecheck/should_compile/tc168.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc168.stderr
@@ -5,6 +5,8 @@ tc168.hs:17:1:
from the context (C a1 (a, b))
bound by the inferred type for `g': C a1 (a, b) => a1 -> a
at tc168.hs:17:1-16
+ The type variable `b0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
Possible fix: add an instance declaration for (C a1 (a, b0))
When checking that `g'
has the inferred type `forall a b a1. C a1 (a, b) => a1 -> a'
diff --git a/testsuite/tests/typecheck/should_compile/tc211.stderr b/testsuite/tests/typecheck/should_compile/tc211.stderr
index 30d986c456..e6c5675422 100644
--- a/testsuite/tests/typecheck/should_compile/tc211.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc211.stderr
@@ -1,25 +1,24 @@
tc211.hs:15:22:
- Couldn't match expected type `a -> a'
- with actual type `forall a1. a1 -> a1'
- Expected type: [a -> a]
- Actual type: [forall a1. a1 -> a1]
+ Couldn't match type `forall a1. a1 -> a1' with `a -> a'
+ Expected type: [a -> a]
+ Actual type: [forall a. a -> a]
In the first argument of `head', namely `foo'
In the first argument of `(:) ::
(forall a. a -> a)
-> [forall a. a -> a] -> [forall a. a -> a]', namely
`(head foo)'
+ In the expression:
+ ((:) ::
+ (forall a. a -> a) -> [forall a. a -> a] -> [forall a. a -> a])
+ (head foo) foo
tc211.hs:70:9:
- Couldn't match expected type `a -> a'
- with actual type `forall a1. a1 -> a1'
- Expected type: List (forall a1. a1 -> a1)
- -> (forall a1. a1 -> a1)
- -> a
- -> a
- Actual type: List (forall a1. a1 -> a1)
- -> (forall a1. a1 -> a1)
- -> forall a1. a1 -> a1
+ Couldn't match type `forall a1. a1 -> a1' with `a -> a'
+ Expected type: List (forall a. a -> a)
+ -> (forall a. a -> a) -> a -> a
+ Actual type: List (forall a. a -> a)
+ -> (forall a. a -> a) -> forall a. a -> a
In the expression:
foo2 ::
List (forall a. a -> a) -> (forall a. a -> a) -> (forall a. a -> a)
@@ -28,3 +27,9 @@ tc211.hs:70:9:
List (forall a. a -> a)
-> (forall a. a -> a) -> (forall a. a -> a))
xs1 (\ x -> x)
+ In an equation for `bar4':
+ bar4
+ = (foo2 ::
+ List (forall a. a -> a)
+ -> (forall a. a -> a) -> (forall a. a -> a))
+ xs1 (\ x -> x)
diff --git a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
index 193d356190..f5a49c89d0 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: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]
+ 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/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..5779301745 100644
--- a/testsuite/tests/typecheck/should_fail/T1899.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1899.stderr
@@ -1,10 +1,11 @@
-
-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: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)'
+ In the expression: Prop (Auxiliary varSet)
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/T2688.stderr b/testsuite/tests/typecheck/should_fail/T2688.stderr
index a658d7395d..aa896569b9 100644
--- a/testsuite/tests/typecheck/should_fail/T2688.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2688.stderr
@@ -1,13 +1,13 @@
-
-T2688.hs:8:22:
- 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 second argument of `(/)', namely `s'
- In the second argument of `(*^)', namely `(1 / s)'
- In the expression: 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.stderr b/testsuite/tests/typecheck/should_fail/T2714.stderr
index da355fc738..18e36fa800 100644
--- a/testsuite/tests/typecheck/should_fail/T2714.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2714.stderr
@@ -14,8 +14,6 @@ T2714.hs:8:5:
`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
diff --git a/testsuite/tests/typecheck/should_fail/T2846b.stderr b/testsuite/tests/typecheck/should_fail/T2846b.stderr
index 79527c15b7..de90637c2a 100644
--- a/testsuite/tests/typecheck/should_fail/T2846b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2846b.stderr
@@ -2,6 +2,8 @@
T2846b.hs:5:5:
No instance for (Show (Num a0 => 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)
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/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/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 8e6f948524..c8d8340885 100644
--- a/testsuite/tests/typecheck/should_fail/T3950.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3950.stderr
@@ -1,7 +1,13 @@
-
-T3950.hs:15:13:
- Couldn't match expected type `Id p' with actual type `Id p x0'
- Expected type: w (Id p)
- Actual type: Sealed (Id p x0)
- In the first argument of `Just', namely rp'
- In the expression: Just rp'
+
+T3950.hs:15:13:
+ Couldn't match type `Id p0 x0' with `Id p'
+ Expected type: w (Id p)
+ Actual type: Sealed (Id p0 x0)
+ In the first argument of `Just', namely rp'
+ In the expression: Just rp'
+ In an equation for `rp':
+ rp _
+ = Just rp'
+ where
+ rp' :: Sealed (Id p x)
+ rp' = undefined
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..a051692bc5 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:15:1-36
+ 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 7c599cc047..52aa99ae71 100644
--- a/testsuite/tests/typecheck/should_fail/T5573a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5573a.stderr
@@ -3,7 +3,7 @@ T5573a.hs:11:16:
Couldn't match kind `ArgKind' against `(#)'
Kind incompatibility when matching types:
t0 :: ArgKind
- (# t1, t2 #) :: (#)
+ (# t0, t1 #) :: (#)
In the expression: (# True, False #)
In the expression: (# x, (# True, False #) #)
@@ -11,6 +11,6 @@ T5573a.hs:14:6:
Couldn't match kind `ArgKind' against `(#)'
Kind incompatibility when matching types:
t0 :: ArgKind
- (# t1, t2 #) :: (#)
+ (# t0, t1 #) :: (#)
In the pattern: (# x, y #)
In an equation for `foo3': foo3 (# x, y #) = x
diff --git a/testsuite/tests/typecheck/should_fail/T5684.stderr b/testsuite/tests/typecheck/should_fail/T5684.stderr
index 0d029786b0..0aa8b17973 100644
--- a/testsuite/tests/typecheck/should_fail/T5684.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5684.stderr
@@ -1,20 +1,10 @@
-
-T5684.hs:24:12:
- No instance for (B Char b5)
- arising from a use of `op'
- Possible fix: add an instance declaration for (B Char b5)
- In the expression: op 'c' undefined
- In the expression:
- [op False False, op 'c' undefined, op True undefined]
- In an equation for `flop1':
- flop1 = [op False False, op 'c' undefined, op True undefined]
-
-T5684.hs:53:12:
- No instance for (A Bool)
- arising from a use of `op'
- Possible fix: add an instance declaration for (A Bool)
- In the expression: op False False
- In the expression:
- [op True undefined, op False False, op 'c' undefined]
- In an equation for `flop6':
- flop6 = [op True undefined, op False False, op 'c' undefined]
+
+T5684.hs: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.stderr b/testsuite/tests/typecheck/should_fail/T5689.stderr
index cad433a2ca..28f9c01940 100644
--- a/testsuite/tests/typecheck/should_fail/T5689.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5689.stderr
@@ -1,7 +1,7 @@
-
-T5689.hs:10:36:
- Couldn't match type `t' with `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)'
+
+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/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 3585f4ae7e..0459783281 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, [''])
diff --git a/testsuite/tests/typecheck/should_fail/mc19.stderr b/testsuite/tests/typecheck/should_fail/mc19.stderr
index b75e90a30d..7015d47d74 100644
--- a/testsuite/tests/typecheck/should_fail/mc19.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc19.stderr
@@ -1,9 +1,10 @@
-
-mc19.hs:10:31:
- 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: [a] -> [[a]]
- In the expression: inits
- In a stmt of a monad comprehension: then inits
+
+mc19.hs:10:31:
+ 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: [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/mc21.stderr b/testsuite/tests/typecheck/should_fail/mc21.stderr
index 1e958c83d2..bd7bac1dd9 100644
--- a/testsuite/tests/typecheck/should_fail/mc21.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc21.stderr
@@ -1,9 +1,10 @@
-
-mc21.hs:12: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 mc21.hs:12:9
- Expected type: [a] -> [[a]]
- Actual type: [a] -> [a]
- In the return type of a call of `take'
- In the expression: take 5
+
+mc21.hs:12: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 mc21.hs:12: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 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 57d9a01835..a309d3bf4b 100644
--- a/testsuite/tests/typecheck/should_fail/mc22.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc22.stderr
@@ -1,9 +1,32 @@
-
-mc22.hs:10:26:
- Couldn't match type `a' with `t0 a'
- `a' is a rigid type variable bound by
- a type expected by the context: [a] -> [t0 a] at mc22.hs:10:9
- Expected type: [a] -> [t0 a]
- Actual type: [a] -> [a]
- In the return type of a call of `take'
- In the expression: take 5
+
+mc22.hs:8:11:
+ No instance for (Num (t0 [Char]))
+ arising from a use of `+'
+ The type variable `t0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ 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)
+ 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: [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..6e69a1df15 100644
--- a/testsuite/tests/typecheck/should_fail/mc23.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc23.stderr
@@ -1,8 +1,36 @@
+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)
+ 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)
+ 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)
+ 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..4856dc75ad 100644
--- a/testsuite/tests/typecheck/should_fail/mc24.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc24.stderr
@@ -1,8 +1,39 @@
+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)
+ 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)
+ 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)
+ 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..71559fb3d2 100644
--- a/testsuite/tests/typecheck/should_fail/mc25.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc25.stderr
@@ -1,7 +1,35 @@
+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)
+ 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)
+ 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)
+ 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..a6d97c71af 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail008.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail008.stderr
@@ -1,7 +1,24 @@
+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
+ 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'
+ 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
Possible fix: add an instance declaration for (Num [a0])
In the second argument of `(:)', namely `2'
In the expression: 1 : 2
diff --git a/testsuite/tests/typecheck/should_fail/tcfail010.stderr b/testsuite/tests/typecheck/should_fail/tcfail010.stderr
index 20a6d222a7..9371d51dcd 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail010.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail010.stderr
@@ -1,8 +1,13 @@
-
-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 `+'
+ The type variable `t0' is ambiguous
+ Possible cause: the monomorphism restriction applied to the following:
+ q :: [t0] -> [t0] (bound at tcfail010.hs:3:1)
+ Probable fix: give these definition(s) an explicit type signature
+ or use -XNoMonomorphismRestriction
+ 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/tcfail018.stderr b/testsuite/tests/typecheck/should_fail/tcfail018.stderr
index 67ee509537..1aa13624e9 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail018.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail018.stderr
@@ -2,6 +2,11 @@
tcfail018.hs:5:10:
No instance for (Num [t0])
arising from the literal `1'
+ The type variable `t0' is ambiguous
+ Possible cause: the monomorphism restriction applied to the following:
+ a :: t0 (bound at tcfail018.hs:5:2)
+ Probable fix: give these definition(s) an explicit type signature
+ or use -XNoMonomorphismRestriction
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/tcfail040.stderr b/testsuite/tests/typecheck/should_fail/tcfail040.stderr
index 19020b609d..cd5ef7a742 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail040.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail040.stderr
@@ -1,8 +1,9 @@
-
-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)
+ 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..cf161d4af2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail043.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail043.stderr
@@ -1,21 +1,37 @@
-
-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
- 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
- In the expression: gt (hd bs) a
- In the expression:
- if gt (hd bs) a then
- False
- else
- if eq a (hd bs) then True else search a (tl bs)
- In the expression:
- \ a bs
- -> if gt (hd bs) a then
- False
- else
- if eq a (hd bs) then True else search a (tl bs)
+
+tcfail043.hs:38:17:
+ No instance for (Ord_ a0)
+ arising from a use of `gt'
+ The type variable `a0' is ambiguous
+ Possible cause: the monomorphism restriction applied to the following:
+ search :: a0 -> [a0] -> Bool (bound at tcfail043.hs:37:1)
+ Probable fix: give these definition(s) an explicit type signature
+ or use -XNoMonomorphismRestriction
+ In the expression: gt (hd bs) a
+ In the expression:
+ if gt (hd bs) a then
+ False
+ else
+ if eq a (hd bs) then True else search a (tl bs)
+ In the expression:
+ \ a bs
+ -> if gt (hd bs) a then
+ 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
+ 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/tcfail065.stderr b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
index 0621cd74d9..3e9aecf817 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail065.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
@@ -1,11 +1,11 @@
-
-tcfail065.hs:29:20:
- Couldn't match type `x1' with `x'
- `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
- In the first argument of `X', namely `x'
- In the expression: X x
- In an equation for `setX': setX x (X _) = X x
+
+tcfail065.hs:29:20:
+ Couldn't match expected type `x' with actual type `x1'
+ `x' is a rigid type variable bound by
+ the instance declaration at tcfail065.hs:28:18
+ `x1' is a rigid type variable bound by
+ the type signature for setX :: x1 -> X x -> X x
+ at tcfail065.hs:29:3
+ In the first argument of `X', namely `x'
+ In the expression: X x
+ In an equation for `setX': setX x (X _) = X x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail067.stderr b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
index 039a4e61f9..513f5e9977 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail067.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
@@ -30,12 +30,12 @@ tcfail067.hs:46:12:
= show value ++ " :" ++ show lower ++ ".." ++ show upper
tcfail067.hs:61:12:
- Could not deduce (Ord a, Show a)
+ Could not deduce (Show a, Ord 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, Ord 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)'
diff --git a/testsuite/tests/typecheck/should_fail/tcfail068.stderr b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
index 286d0e8e79..11d39617db 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail068.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
@@ -1,91 +1,97 @@
-
-tcfail068.hs:14:9:
- Could not deduce (s1 ~ s)
- from the context (Constructed a)
- bound by the type signature for
- itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
- at tcfail068.hs:(12,1)-(14,31)
- `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:12:1
- Expected type: GHC.ST.ST s (IndTree s1 a)
- Actual type: GHC.ST.ST s (STArray s (Int, Int) a)
- In the return type of a call of `newSTArray'
- In the first argument of `runST', namely
- `(newSTArray ((1, 1), n) x)'
-
-tcfail068.hs:19:21:
- Could not deduce (s ~ s1)
- from the context (Constructed a)
- bound by the type signature for
- itiap :: Constructed a =>
- (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:(17,1)-(21,19)
- `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
- `s1' is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (IndTree s a)
- at tcfail068.hs:18:9
- Expected type: STArray s1 (Int, Int) a
- Actual type: IndTree s a
- In the first argument of `readSTArray', namely `arr'
- In the first argument of `(>>=)', namely `readSTArray arr i'
-
-tcfail068.hs:24:35:
- Could not deduce (s ~ s1)
- from the context (Constructed a)
- bound by the type signature for
- itrap :: Constructed a =>
- ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:(24,1)-(32,41)
- `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
- `s1' is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (IndTree s a)
- at tcfail068.hs:24:29
- Expected type: GHC.ST.ST s1 (IndTree s a)
- Actual type: GHC.ST.ST s (IndTree s a)
- In the return type of a call of itrap'
- In the first argument of `runST', namely `(itrap' i k)'
-
-tcfail068.hs:36:46:
- Could not deduce (s ~ s1)
- from the context (Constructed b)
- bound by the type signature for
- itrapstate :: Constructed b =>
- ((Int, Int), (Int, Int))
- -> (a -> b -> (a, b))
- -> ((Int, Int) -> c -> a)
- -> (a -> c)
- -> c
- -> IndTree s b
- -> (c, IndTree s b)
- at tcfail068.hs:(36,1)-(45,66)
- `s' is a rigid type variable bound by
- the type signature for
- itrapstate :: Constructed b =>
- ((Int, Int), (Int, Int))
- -> (a -> b -> (a, b))
- -> ((Int, Int) -> c -> a)
- -> (a -> c)
- -> c
- -> IndTree s b
- -> (c, IndTree s b)
- at tcfail068.hs:36:1
- `s1' is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (c, IndTree s b)
- at tcfail068.hs:36:40
- Expected type: GHC.ST.ST s1 (c, IndTree s b)
- Actual type: GHC.ST.ST s (c, IndTree s b)
- In the return type of a call of itrapstate'
- In the first argument of `runST', namely `(itrapstate' i k s)'
+
+tcfail068.hs:14:9:
+ Could not deduce (s1 ~ s)
+ from the context (Constructed a)
+ bound by the type signature for
+ itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
+ at tcfail068.hs:(12,1)-(14,31)
+ `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:12:1
+ Expected type: GHC.ST.ST s1 (IndTree s a)
+ Actual type: GHC.ST.ST s1 (STArray s1 (Int, Int) a)
+ In the return type of a call of `newSTArray'
+ In the first argument of `runST', namely
+ `(newSTArray ((1, 1), n) x)'
+ In the expression: runST (newSTArray ((1, 1), n) x)
+
+tcfail068.hs:19:21:
+ Could not deduce (s ~ s1)
+ from the context (Constructed a)
+ bound by the type signature for
+ itiap :: Constructed a =>
+ (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
+ at tcfail068.hs:(17,1)-(21,19)
+ `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
+ `s1' is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (IndTree s a)
+ at tcfail068.hs:18:9
+ Expected type: STArray s1 (Int, Int) a
+ Actual type: IndTree s a
+ In the first argument of `readSTArray', namely `arr'
+ In the first argument of `(>>=)', namely `readSTArray arr i'
+ In the first argument of `runST', namely
+ `(readSTArray arr i
+ >>= \ val -> writeSTArray arr i (f val) >> return arr)'
+
+tcfail068.hs:24:35:
+ Could not deduce (s ~ s1)
+ from the context (Constructed a)
+ bound by the type signature for
+ itrap :: Constructed a =>
+ ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
+ at tcfail068.hs:(24,1)-(32,41)
+ `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
+ `s1' is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (IndTree s a)
+ at tcfail068.hs:24:29
+ Expected type: GHC.ST.ST s1 (IndTree s a)
+ Actual type: GHC.ST.ST s (IndTree s a)
+ In the return type of a call of itrap'
+ In the first argument of `runST', namely `(itrap' i k)'
+ In the expression: runST (itrap' i k)
+
+tcfail068.hs:36:46:
+ Could not deduce (s ~ s1)
+ from the context (Constructed b)
+ bound by the type signature for
+ itrapstate :: Constructed b =>
+ ((Int, Int), (Int, Int))
+ -> (a -> b -> (a, b))
+ -> ((Int, Int) -> c -> a)
+ -> (a -> c)
+ -> c
+ -> IndTree s b
+ -> (c, IndTree s b)
+ at tcfail068.hs:(36,1)-(45,66)
+ `s' is a rigid type variable bound by
+ the type signature for
+ itrapstate :: Constructed b =>
+ ((Int, Int), (Int, Int))
+ -> (a -> b -> (a, b))
+ -> ((Int, Int) -> c -> a)
+ -> (a -> c)
+ -> c
+ -> IndTree s b
+ -> (c, IndTree s b)
+ at tcfail068.hs:36:1
+ `s1' is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (c, IndTree s b)
+ at tcfail068.hs:36:40
+ Expected type: GHC.ST.ST s1 (c, IndTree s b)
+ Actual type: GHC.ST.ST s (c, IndTree s b)
+ In the return type of a call of itrapstate'
+ In the first argument of `runST', namely `(itrapstate' i k s)'
+ In the expression: runST (itrapstate' i k s)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
index 469e75849a..4d6bd867b2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
@@ -1,14 +1,11 @@
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 p0, 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:23:1-15
+ The type variables `p0', `q0' are ambiguous
+ Possible 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
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/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/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/tcfail103.stderr b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
index 2602859db4..7d6e4dfd6c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail103.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
@@ -1,11 +1,12 @@
-
-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
- `s' is a rigid type variable bound by
- the type signature for g :: ST s Int at tcfail103.hs:15:9
- Expected type: STRef s Int
- Actual type: STRef t Int
- In the first argument of `readSTRef', namely `v'
- In the expression: readSTRef v
+
+tcfail103.hs:15:23:
+ Couldn't match type `t' with `s'
+ `t' is a rigid type variable bound by
+ the type signature for f :: ST t Int at tcfail103.hs:11:1
+ `s' is a rigid type variable bound by
+ the type signature for g :: ST s Int at tcfail103.hs:15:9
+ 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/tcfail128.stderr b/testsuite/tests/typecheck/should_fail/tcfail128.stderr
index a3c99a9548..90793cf7d0 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail128.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail128.stderr
@@ -2,6 +2,8 @@
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)
Possible fix:
add an instance declaration for
(Data.Array.Base.MArray b0 FlatVector IO)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail133.stderr b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
index 2808159950..fb506dd7d1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail133.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
@@ -2,9 +2,21 @@
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)
+ 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)
arising from a use of `add'
+ The type variable `a0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
Possible fix:
add an instance declaration for
(AddDigit (Zero :@ (One :@ One)) One a0)
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..3fd20cc2f9 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail142.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
@@ -1,8 +1,9 @@
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'
+ The type variables `a0', `r0' are ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
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/tcfail153.stderr b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
index 0b40df47d1..ca0b42b054 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail153.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
@@ -1,6 +1,6 @@
tcfail153.hs:6:9:
- Couldn't match type `a' with `Bool'
+ Couldn't match expected type `a' with actual type `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'
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..714edb1f12 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail171.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail171.stderr
@@ -1,6 +1,6 @@
tcfail171.hs:9:10:
- No instances for (PrintfType b, PrintfArg a)
+ No instances for (PrintfArg a, PrintfType b)
arising from a use of `printf'
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/tcfail174.stderr b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
index cf8c4cc9c0..89135d656e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail174.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
@@ -1,29 +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 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 a. a -> a 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
-
-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:16:1
- 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
+
+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:16:1
+ 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..4fe5bfbe41 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail175.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
@@ -1,6 +1,7 @@
tcfail175.hs:11:1:
- Couldn't match type `a' with `String -> String -> String'
+ 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:11:1
The equation(s) for `evalRHS' have three arguments,
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 6d723db452..a24d404e15 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail179.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
@@ -1,13 +1,13 @@
-
-tcfail179.hs:14:39:
- Couldn't match type `x' with `s'
- `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
- `s' is a rigid type variable bound by
- the type signature for run :: T s -> Int at tcfail179.hs:13:1
- In the first argument of `g', namely `x'
- In the expression: g x id
- In a pattern binding: (x, _, b) = g x id
+
+tcfail179.hs:14:39:
+ Couldn't match expected type `s' with actual type `x'
+ `s' is a rigid type variable bound by
+ the type signature for run :: T s -> Int at tcfail179.hs:13:1
+ `x' is a rigid type variable bound by
+ a pattern with constructor
+ T :: forall s x. (s -> (x -> s) -> (x, s, Int)) -> T s,
+ in a case alternative
+ at tcfail179.hs:14:14
+ In the first argument of `g', namely `x'
+ In the expression: g x id
+ In a pattern binding: (x, _, b) = g x id
diff --git a/testsuite/tests/typecheck/should_fail/tcfail181.stderr b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
index 59fe8b83af..25e6cbf2af 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail181.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail181.stderr
@@ -1,8 +1,9 @@
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)
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/tcfail191.stderr b/testsuite/tests/typecheck/should_fail/tcfail191.stderr
index f69bd2c263..a276a04eae 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail191.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail191.stderr
@@ -1,9 +1,10 @@
-
-tcfail191.hs:11: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 tcfail191.hs:11:9
- Expected type: [a] -> [[a]]
- Actual type: [a] -> [a]
- In the return type of a call of `take'
- In the expression: take 5
+
+tcfail191.hs:11: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 tcfail191.hs:11: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/tcfail192.stderr b/testsuite/tests/typecheck/should_fail/tcfail192.stderr
index 097c02fab5..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 988810e2f8..47375e8401 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail193.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail193.stderr
@@ -1,9 +1,10 @@
-
-tcfail193.hs:10:31:
- 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: [a] -> [[a]]
- In the expression: inits
- In a stmt of a list comprehension: then inits
+
+tcfail193.hs:10:31:
+ 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: [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..c206bd51f3 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail194.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail194.stderr
@@ -1,8 +1,27 @@
+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)
+ 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)
+ 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/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..f45b899b90 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail201.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
@@ -1,15 +1,15 @@
-
-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:18:28:
+ Couldn't match expected type `a' with actual type `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 }
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 f469475b9f..76b5c7ebd2 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: a -> (a, a)
- 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:11:1
+ 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: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, #)
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_run/Defer01.hs b/testsuite/tests/typecheck/should_run/Defer01.hs
new file mode 100755
index 0000000000..368db9873f
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/Defer01.hs
@@ -0,0 +1,53 @@
+-- Test -fdefer-type-errors
+-- Should compile and run
+
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE GADTs #-}
+{-# OPTIONS_GHC -fdefer-type-errors #-}
+
+module Main where
+
+t5624 :: IO ()
+t5624 = putStr "Hello World" >> putStr ','
+
+a :: Int
+a = 'p'
+
+data B = B
+b :: B -> Bool
+b x = x == x
+
+data C a where
+ C1 :: C Int
+ C2 :: Bool -> C Bool
+
+c :: C Int -> Bool
+c (C2 x) = True
+
+d :: a -> a
+d = 1
+
+e = 'p'
+f = e 'q'
+
+h :: a -> (Char,Char)
+h x = (x,'c')
+
+data T a where
+ K :: a -> T a
+
+i a = seq (not (K a)) ()
+
+class MyClass a where myOp :: a -> String
+
+j = myOp 23 -- Two errors, should not combine them
+
+k :: (Int ~ Bool) => Int -> Bool
+k x = x
+
+l :: IO ()
+l = putChar >> putChar 'p'
+
+
+main :: IO ()
+main = print "No errors!"
diff --git a/testsuite/tests/typecheck/should_run/Defer01.stdout b/testsuite/tests/typecheck/should_run/Defer01.stdout
new file mode 100644
index 0000000000..19c37779d6
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/Defer01.stdout
@@ -0,0 +1 @@
+"No errors!"
diff --git a/testsuite/tests/typecheck/should_run/all.T b/testsuite/tests/typecheck/should_run/all.T
index aacdc7d082..d13b317222 100644..100755
--- a/testsuite/tests/typecheck/should_run/all.T
+++ b/testsuite/tests/typecheck/should_run/all.T
@@ -11,6 +11,7 @@ test('tcrun002', only_compiler_types(['ghc']), compile_and_run, [''])
test('tcrun003', normal, compile_and_run, [''])
test('tcrun004', normal, compile_and_run, [''])
test('tcrun005', normal, compile_and_run, [''])
+test('Defer01', normal, compile_and_run, [''])
# -----------------------------------------------------------------------------
# Skip everything else if fast is on
@@ -84,4 +85,4 @@ test('T3500a', normal, compile_and_run, [''])
test('T3500b', normal, compile_and_run, [''])
test('T4809', reqlib('mtl'), compile_and_run, [''])
test('T2722', normal, compile_and_run, [''])
-test('mc17', normal, compile_and_run, [''])
+test('mc17', normal, compile_and_run, ['']) \ No newline at end of file
diff --git a/testsuite/tests/typecheck/should_run/tcrun041.hs b/testsuite/tests/typecheck/should_run/tcrun041.hs
index f78141adc7..dbdebf7687 100644
--- a/testsuite/tests/typecheck/should_run/tcrun041.hs
+++ b/testsuite/tests/typecheck/should_run/tcrun041.hs
@@ -23,7 +23,7 @@ h = (# ,1, #)
unchanged :: a -> (# Int #)
-unchanged _binding = (# #) 1
+unchanged _binding = (# 1 #)
main = do