summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-01-03 23:27:21 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-01-06 14:18:44 +0000
commit00e1fc1b18e1b5aa5db18bee9f9adc67435f00b0 (patch)
treedebc157bb5e87e8cf464f9fd9517c089a9dd5861
parentf17992a4954ac14cc6a3fe6a61ec6544a098da93 (diff)
downloadhaskell-00e1fc1b18e1b5aa5db18bee9f9adc67435f00b0.tar.gz
Modify a couple of error messages slightly
In particular In the type signature for: f :: Int -> Int I added the colon Also reword the "maybe you haven't applied a function to enough arguments?" suggestion to make grammatical sense. These tiny changes affect a lot of error messages.
-rw-r--r--compiler/typecheck/TcErrors.hs2
-rw-r--r--compiler/typecheck/TcRnTypes.hs68
-rw-r--r--testsuite/tests/annotations/should_fail/annfail08.stderr24
-rw-r--r--testsuite/tests/arrows/should_fail/T5380.stderr8
-rw-r--r--testsuite/tests/deriving/should_fail/drvfail007.stderr18
-rw-r--r--testsuite/tests/driver/T2182.stderr56
-rw-r--r--testsuite/tests/gadt/T3169.stderr4
-rw-r--r--testsuite/tests/gadt/T3651.stderr6
-rw-r--r--testsuite/tests/gadt/T7293.stderr17
-rw-r--r--testsuite/tests/gadt/T7294.stderr17
-rw-r--r--testsuite/tests/gadt/T7558.stderr26
-rw-r--r--testsuite/tests/gadt/gadt-escape1.stderr35
-rw-r--r--testsuite/tests/gadt/gadt13.stderr33
-rw-r--r--testsuite/tests/gadt/gadt21.stderr2
-rw-r--r--testsuite/tests/gadt/gadt7.stderr39
-rw-r--r--testsuite/tests/gadt/rw.stderr4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break003.stderr12
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr15
-rw-r--r--testsuite/tests/ghci/scripts/T2182ghci.stderr60
-rw-r--r--testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_compile/Simple14.stderr4
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3208b.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr29
-rw-r--r--testsuite/tests/indexed-types/should_fail/Overlap6.stderr26
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T2664.stderr42
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3330a.stderr6
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3440.stderr44
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4093a.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4093b.stderr16
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4174.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_fail/T4272.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7194.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T7786.stderr25
-rw-r--r--testsuite/tests/indexed-types/should_fail/T9662.stderr36
-rw-r--r--testsuite/tests/parser/should_fail/T7848.stderr92
-rw-r--r--testsuite/tests/partial-sigs/should_fail/AnnotatedConstraint.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr42
-rw-r--r--testsuite/tests/polykinds/T7230.stderr56
-rw-r--r--testsuite/tests/polykinds/T7438.stderr38
-rw-r--r--testsuite/tests/polykinds/T8566.stderr38
-rw-r--r--testsuite/tests/rebindable/rebindable6.stderr132
-rw-r--r--testsuite/tests/typecheck/should_compile/FD1.stderr18
-rw-r--r--testsuite/tests/typecheck/should_compile/FD2.stderr38
-rw-r--r--testsuite/tests/typecheck/should_compile/FD3.stderr28
-rw-r--r--testsuite/tests/typecheck/should_compile/T7220a.stderr28
-rw-r--r--testsuite/tests/typecheck/should_compile/T9834.stderr142
-rw-r--r--testsuite/tests/typecheck/should_compile/tc141.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr24
-rw-r--r--testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr105
-rw-r--r--testsuite/tests/typecheck/should_fail/IPFail.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/T1899.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/T2714.stderr48
-rw-r--r--testsuite/tests/typecheck/should_fail/T2846b.stderr14
-rw-r--r--testsuite/tests/typecheck/should_fail/T3592.stderr32
-rw-r--r--testsuite/tests/typecheck/should_fail/T5236.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/T5300.stderr64
-rw-r--r--testsuite/tests/typecheck/should_fail/T7453.stderr90
-rw-r--r--testsuite/tests/typecheck/should_fail/T7748a.stderr36
-rw-r--r--testsuite/tests/typecheck/should_fail/T8392a.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/T8450.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/T9109.stderr29
-rw-r--r--testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/mc22.stderr42
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail034.stderr24
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail065.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail067.stderr152
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail068.stderr192
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail072.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail097.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail099.stderr29
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail102.stderr26
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail103.stderr30
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail125.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail131.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail142.stderr22
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail153.stderr32
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail167.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail171.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail174.stderr64
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail175.stderr20
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail179.stderr34
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail201.stderr40
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail206.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail208.stderr18
86 files changed, 1397 insertions, 1399 deletions
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index 9a472760cd..44fbadb744 100644
--- a/compiler/typecheck/TcErrors.hs
+++ b/compiler/typecheck/TcErrors.hs
@@ -1252,7 +1252,7 @@ mk_dict_err ctxt (ct, (matches, unifiers, safe_haskell))
= ptext (sLit "No instance for")
<+> pprParendType pred
$$ if type_has_arrow pred
- then nest 2 $ ptext (sLit "(maybe you haven't applied enough arguments to a function?)")
+ then nest 2 $ ptext (sLit "(maybe you haven't applied a function to enough arguments?)")
else empty
| otherwise
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs
index 583bc975ef..5b77ebe0cf 100644
--- a/compiler/typecheck/TcRnTypes.hs
+++ b/compiler/typecheck/TcRnTypes.hs
@@ -1932,35 +1932,21 @@ instance Outputable SkolemInfo where
pprSkolInfo :: SkolemInfo -> SDoc
-- Complete the sentence "is a rigid type variable bound by..."
-pprSkolInfo (SigSkol (FunSigCtxt f) ty)
- = hang (ptext (sLit "the type signature for"))
- 2 (pprPrefixOcc f <+> dcolon <+> ppr ty)
-pprSkolInfo (SigSkol cx ty) = hang (pprUserTypeCtxt cx <> colon)
- 2 (ppr ty)
-pprSkolInfo (IPSkol ips) = ptext (sLit "the implicit-parameter binding") <> plural ips <+> ptext (sLit "for")
- <+> pprWithCommas ppr ips
-pprSkolInfo (ClsSkol cls) = ptext (sLit "the class declaration for") <+> quotes (ppr cls)
-pprSkolInfo InstSkol = ptext (sLit "the instance declaration")
-pprSkolInfo DataSkol = ptext (sLit "the data type declaration")
-pprSkolInfo FamInstSkol = ptext (sLit "the family instance declaration")
-pprSkolInfo BracketSkol = ptext (sLit "a Template Haskell bracket")
-pprSkolInfo (RuleSkol name) = ptext (sLit "the RULE") <+> doubleQuotes (ftext name)
-pprSkolInfo ArrowSkol = ptext (sLit "the arrow form")
-pprSkolInfo (PatSkol cl mc) = case cl of
- RealDataCon dc -> sep [ ptext (sLit "a pattern with constructor")
- , nest 2 $ ppr dc <+> dcolon
- <+> pprType (dataConUserType dc) <> comma
- -- pprType prints forall's regardless of -fprint-explict-foralls
- -- which is what we want here, since we might be saying
- -- type variable 't' is bound by ...
- , ptext (sLit "in") <+> pprMatchContext mc ]
- PatSynCon ps -> sep [ ptext (sLit "a pattern with pattern synonym")
- , nest 2 $ ppr ps <+> dcolon
- <+> pprType (patSynType ps) <> comma
- , ptext (sLit "in") <+> pprMatchContext mc ]
-pprSkolInfo (InferSkol ids) = sep [ ptext (sLit "the inferred type of")
- , vcat [ ppr name <+> dcolon <+> ppr ty
- | (name,ty) <- ids ]]
+pprSkolInfo (SigSkol ctxt ty) = pprSigSkolInfo ctxt ty
+pprSkolInfo (IPSkol ips) = ptext (sLit "the implicit-parameter binding") <> plural ips <+> ptext (sLit "for")
+ <+> pprWithCommas ppr ips
+pprSkolInfo (ClsSkol cls) = ptext (sLit "the class declaration for") <+> quotes (ppr cls)
+pprSkolInfo InstSkol = ptext (sLit "the instance declaration")
+pprSkolInfo DataSkol = ptext (sLit "a data type declaration")
+pprSkolInfo FamInstSkol = ptext (sLit "a family instance declaration")
+pprSkolInfo BracketSkol = ptext (sLit "a Template Haskell bracket")
+pprSkolInfo (RuleSkol name) = ptext (sLit "the RULE") <+> doubleQuotes (ftext name)
+pprSkolInfo ArrowSkol = ptext (sLit "an arrow form")
+pprSkolInfo (PatSkol cl mc) = sep [ pprPatSkolInfo cl
+ , ptext (sLit "in") <+> pprMatchContext mc ]
+pprSkolInfo (InferSkol ids) = sep [ ptext (sLit "the inferred type of")
+ , vcat [ ppr name <+> dcolon <+> ppr ty
+ | (name,ty) <- ids ]]
pprSkolInfo (UnifyForAllSkol tvs ty) = ptext (sLit "the type") <+> ppr (mkForAllTys tvs ty)
-- UnkSkol
@@ -1968,6 +1954,30 @@ pprSkolInfo (UnifyForAllSkol tvs ty) = ptext (sLit "the type") <+> ppr (mkForAll
-- For Insts, these cases should not happen
pprSkolInfo UnkSkol = WARN( True, text "pprSkolInfo: UnkSkol" ) ptext (sLit "UnkSkol")
+pprSigSkolInfo :: UserTypeCtxt -> Type -> SDoc
+pprSigSkolInfo ctxt ty
+ = case ctxt of
+ FunSigCtxt f _ -> pp_sig f
+ _ -> hang (pprUserTypeCtxt ctxt <> colon)
+ 2 (ppr ty)
+ where
+ pp_sig f = sep [ ptext (sLit "the type signature for:")
+ , pprPrefixOcc f <+> dcolon <+> ppr ty ]
+
+pprPatSkolInfo :: ConLike -> SDoc
+pprPatSkolInfo (RealDataCon dc)
+ = sep [ ptext (sLit "a pattern with constructor:")
+ , nest 2 $ ppr dc <+> dcolon
+ <+> pprType (dataConUserType dc) <> comma ]
+ -- pprType prints forall's regardless of -fprint-explict-foralls
+ -- which is what we want here, since we might be saying
+ -- type variable 't' is bound by ...
+
+pprPatSkolInfo (PatSynCon ps)
+ = sep [ ptext (sLit "a pattern with pattern synonym:")
+ , nest 2 $ ppr ps <+> dcolon
+ <+> pprType (patSynType ps) <> comma ]
+
{-
************************************************************************
* *
diff --git a/testsuite/tests/annotations/should_fail/annfail08.stderr b/testsuite/tests/annotations/should_fail/annfail08.stderr
index 0449033685..1c6f9f645c 100644
--- a/testsuite/tests/annotations/should_fail/annfail08.stderr
+++ b/testsuite/tests/annotations/should_fail/annfail08.stderr
@@ -1,12 +1,12 @@
-
-annfail08.hs:9:1:
- No instance for (Data.Data.Data (a0 -> a0))
- (maybe you haven't applied enough arguments to a function?)
- arising from an annotation
- In the annotation: {-# ANN f (id + 1) #-}
-
-annfail08.hs:9:15:
- No instance for (Num (a0 -> a0))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘+’
- In the annotation: {-# ANN f (id + 1) #-}
+
+annfail08.hs:9:1:
+ No instance for (Data.Data.Data (a0 -> a0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from an annotation
+ In the annotation: {-# ANN f (id + 1) #-}
+
+annfail08.hs:9:15:
+ No instance for (Num (a0 -> a0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘+’
+ In the annotation: {-# ANN f (id + 1) #-}
diff --git a/testsuite/tests/arrows/should_fail/T5380.stderr b/testsuite/tests/arrows/should_fail/T5380.stderr
index 1f8d4518fb..bff48f5233 100644
--- a/testsuite/tests/arrows/should_fail/T5380.stderr
+++ b/testsuite/tests/arrows/should_fail/T5380.stderr
@@ -2,8 +2,8 @@
T5380.hs:7:27:
Couldn't match expected type ‘Bool’ with actual type ‘not_bool’
‘not_bool’ is a rigid type variable bound by
- the type signature for
- testB :: not_bool -> (() -> ()) -> () -> not_unit
+ the type signature for:
+ testB :: not_bool -> (() -> ()) -> () -> not_unit
at T5380.hs:6:10
Relevant bindings include
b :: not_bool (bound at T5380.hs:7:7)
@@ -15,8 +15,8 @@ T5380.hs:7:27:
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
+ the type signature for:
+ testB :: not_bool -> (() -> ()) -> () -> not_unit
at T5380.hs:6:10
Expected type: () -> not_unit
Actual type: () -> ()
diff --git a/testsuite/tests/deriving/should_fail/drvfail007.stderr b/testsuite/tests/deriving/should_fail/drvfail007.stderr
index 91cf8bfa38..ad43243eb0 100644
--- a/testsuite/tests/deriving/should_fail/drvfail007.stderr
+++ b/testsuite/tests/deriving/should_fail/drvfail007.stderr
@@ -1,9 +1,9 @@
-
-drvfail007.hs:4:38:
- No instance for (Eq (Int -> Int))
- (maybe you haven't applied enough arguments to a function?)
- arising from the first field of ‘Foo’ (type ‘Int -> Int’)
- Possible fix:
- use a standalone 'deriving instance' declaration,
- so you can specify the instance context yourself
- When deriving the instance for (Eq Foo)
+
+drvfail007.hs:4:38:
+ No instance for (Eq (Int -> Int))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from the first field of ‘Foo’ (type ‘Int -> Int’)
+ Possible fix:
+ use a standalone 'deriving instance' declaration,
+ so you can specify the instance context yourself
+ When deriving the instance for (Eq Foo)
diff --git a/testsuite/tests/driver/T2182.stderr b/testsuite/tests/driver/T2182.stderr
index b8d9e8b437..d88f6c0057 100644
--- a/testsuite/tests/driver/T2182.stderr
+++ b/testsuite/tests/driver/T2182.stderr
@@ -1,28 +1,28 @@
-
-T2182.hs:5:5:
- No instance for (Show (t1 -> t1))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘show’
- In the expression: show (\ x -> x)
- In an equation for ‘y’: y = show (\ x -> x)
-
-T2182.hs:6:15:
- No instance for (Eq (t0 -> t0))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘==’
- In the expression: (\ x -> x) == (\ y -> y)
- In an equation for ‘z’: z = (\ x -> x) == (\ y -> y)
-
-T2182.hs:5:5:
- No instance for (Show (t1 -> t1))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘show’
- In the expression: show (\ x -> x)
- In an equation for ‘y’: y = show (\ x -> x)
-
-T2182.hs:6:15:
- No instance for (Eq (t0 -> t0))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘==’
- In the expression: (\ x -> x) == (\ y -> y)
- In an equation for ‘z’: z = (\ x -> x) == (\ y -> y)
+
+T2182.hs:5:5:
+ No instance for (Show (t1 -> t1))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘show’
+ In the expression: show (\ x -> x)
+ In an equation for ‘y’: y = show (\ x -> x)
+
+T2182.hs:6:15:
+ No instance for (Eq (t0 -> t0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘==’
+ In the expression: (\ x -> x) == (\ y -> y)
+ In an equation for ‘z’: z = (\ x -> x) == (\ y -> y)
+
+T2182.hs:5:5:
+ No instance for (Show (t1 -> t1))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘show’
+ In the expression: show (\ x -> x)
+ In an equation for ‘y’: y = show (\ x -> x)
+
+T2182.hs:6:15:
+ No instance for (Eq (t0 -> t0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘==’
+ In the expression: (\ x -> x) == (\ y -> y)
+ In an equation for ‘z’: z = (\ x -> x) == (\ y -> y)
diff --git a/testsuite/tests/gadt/T3169.stderr b/testsuite/tests/gadt/T3169.stderr
index a646a56462..3e4a9504b2 100644
--- a/testsuite/tests/gadt/T3169.stderr
+++ b/testsuite/tests/gadt/T3169.stderr
@@ -2,8 +2,8 @@
T3169.hs:13:22:
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
+ the type signature for:
+ lookup :: (a, b) -> Map (a, b) elt -> Maybe elt
at T3169.hs:12:3
Expected type: Map a (Map b elt)
Actual type: Map (a, b) elt
diff --git a/testsuite/tests/gadt/T3651.stderr b/testsuite/tests/gadt/T3651.stderr
index e9230a4538..db723c8d50 100644
--- a/testsuite/tests/gadt/T3651.stderr
+++ b/testsuite/tests/gadt/T3651.stderr
@@ -2,20 +2,20 @@
T3651.hs:11:11:
Couldn't match type ‘Bool’ with ‘()’
Inaccessible code in
- a pattern with constructor U :: Z (), in an equation for ‘unsafe1’
+ a pattern with constructor: U :: Z (), in an equation for ‘unsafe1’
In the pattern: U
In an equation for ‘unsafe1’: unsafe1 B U = ()
T3651.hs:14:11:
Couldn't match type ‘Bool’ with ‘()’
Inaccessible code in
- a pattern with constructor U :: Z (), in an equation for ‘unsafe2’
+ a pattern with constructor: U :: Z (), in an equation for ‘unsafe2’
In the pattern: U
In an equation for ‘unsafe2’: unsafe2 B U = ()
T3651.hs:17:11:
Couldn't match type ‘Bool’ with ‘()’
Inaccessible code in
- a pattern with constructor U :: Z (), in an equation for ‘unsafe3’
+ a pattern with constructor: U :: Z (), in an equation for ‘unsafe3’
In the pattern: U
In an equation for ‘unsafe3’: unsafe3 B U = True
diff --git a/testsuite/tests/gadt/T7293.stderr b/testsuite/tests/gadt/T7293.stderr
index 3e5d9ddf8f..35c02d5f90 100644
--- a/testsuite/tests/gadt/T7293.stderr
+++ b/testsuite/tests/gadt/T7293.stderr
@@ -1,9 +1,8 @@
-
-T7293.hs:24:5:
- Couldn't match type ‘'True’ with ‘'False’
- Inaccessible code in
- a pattern with constructor
- Nil :: forall a. Vec a 'Zero,
- in an equation for ‘nth’
- In the pattern: Nil
- In an equation for ‘nth’: nth Nil _ = undefined
+
+T7293.hs:24:5:
+ Couldn't match type ‘'True’ with ‘'False’
+ Inaccessible code in
+ a pattern with constructor: Nil :: forall a. Vec a 'Zero,
+ in an equation for ‘nth’
+ In the pattern: Nil
+ In an equation for ‘nth’: nth Nil _ = undefined
diff --git a/testsuite/tests/gadt/T7294.stderr b/testsuite/tests/gadt/T7294.stderr
index b5e4e56f35..b4379b10bb 100644
--- a/testsuite/tests/gadt/T7294.stderr
+++ b/testsuite/tests/gadt/T7294.stderr
@@ -1,9 +1,8 @@
-
-T7294.hs:25:5: Warning:
- Couldn't match type ‘'True’ with ‘'False’
- Inaccessible code in
- a pattern with constructor
- Nil :: forall a. Vec a 'Zero,
- in an equation for ‘nth’
- In the pattern: Nil
- In an equation for ‘nth’: nth Nil _ = undefined
+
+T7294.hs:25:5: Warning:
+ Couldn't match type ‘'True’ with ‘'False’
+ Inaccessible code in
+ a pattern with constructor: Nil :: forall a. Vec a 'Zero,
+ in an equation for ‘nth’
+ In the pattern: Nil
+ In an equation for ‘nth’: nth Nil _ = undefined
diff --git a/testsuite/tests/gadt/T7558.stderr b/testsuite/tests/gadt/T7558.stderr
index 054c41f5aa..4929982f70 100644
--- a/testsuite/tests/gadt/T7558.stderr
+++ b/testsuite/tests/gadt/T7558.stderr
@@ -1,13 +1,13 @@
-
-T7558.hs:8:4:
- Couldn't match type ‘a’ with ‘Maybe a’
- ‘a’ is a rigid type variable bound by
- the type signature for f :: T a a -> Bool at T7558.hs:7:6
- Inaccessible code in
- a pattern with constructor
- MkT :: forall a b. (a ~ Maybe b) => a -> Maybe b -> T a b,
- in an equation for ‘f’
- Relevant bindings include
- f :: T a a -> Bool (bound at T7558.hs:8:1)
- In the pattern: MkT x y
- In an equation for ‘f’: f (MkT x y) = [x, y] `seq` True
+
+T7558.hs:8:4:
+ Couldn't match type ‘a’ with ‘Maybe a’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: f :: T a a -> Bool at T7558.hs:7:6
+ Inaccessible code in
+ a pattern with constructor:
+ MkT :: forall a b. (a ~ Maybe b) => a -> Maybe b -> T a b,
+ in an equation for ‘f’
+ Relevant bindings include
+ f :: T a a -> Bool (bound at T7558.hs:8:1)
+ In the pattern: MkT x y
+ In an equation for ‘f’: f (MkT x y) = [x, y] `seq` True
diff --git a/testsuite/tests/gadt/gadt-escape1.stderr b/testsuite/tests/gadt/gadt-escape1.stderr
index 35d1bf44d4..a98e2739a9 100644
--- a/testsuite/tests/gadt/gadt-escape1.stderr
+++ b/testsuite/tests/gadt/gadt-escape1.stderr
@@ -1,18 +1,17 @@
-
-gadt-escape1.hs:19:58:
- Couldn't match type ‘t’ with ‘ExpGADT Int’
- ‘t’ is untouchable
- inside the constraints (t1 ~ Int)
- bound by a pattern with constructor
- ExpInt :: Int -> ExpGADT Int,
- in a case alternative
- at gadt-escape1.hs:19:43-50
- ‘t’ is a rigid type variable bound by
- the inferred type of weird1 :: t at gadt-escape1.hs:19:1
- Possible fix: add a type signature for ‘weird1’
- Expected type: t
- Actual type: ExpGADT t1
- Relevant bindings include
- weird1 :: t (bound at gadt-escape1.hs:19:1)
- In the expression: a
- In a case alternative: Hidden (ExpInt _) a -> a
+
+gadt-escape1.hs:19:58:
+ Couldn't match type ‘t’ with ‘ExpGADT Int’
+ ‘t’ is untouchable
+ inside the constraints (t1 ~ Int)
+ bound by a pattern with constructor: ExpInt :: Int -> ExpGADT Int,
+ in a case alternative
+ at gadt-escape1.hs:19:43-50
+ ‘t’ is a rigid type variable bound by
+ the inferred type of weird1 :: t at gadt-escape1.hs:19:1
+ Possible fix: add a type signature for ‘weird1’
+ Expected type: t
+ Actual type: ExpGADT t1
+ Relevant bindings include
+ weird1 :: t (bound at gadt-escape1.hs:19:1)
+ In the expression: a
+ In a case alternative: Hidden (ExpInt _) a -> a
diff --git a/testsuite/tests/gadt/gadt13.stderr b/testsuite/tests/gadt/gadt13.stderr
index 563492dca3..c8b7259663 100644
--- a/testsuite/tests/gadt/gadt13.stderr
+++ b/testsuite/tests/gadt/gadt13.stderr
@@ -1,17 +1,16 @@
-
-gadt13.hs:15:13:
- Couldn't match expected type ‘t’
- with actual type ‘String -> [Char]’
- ‘t’ is untouchable
- inside the constraints (t1 ~ Int)
- bound by a pattern with constructor
- I :: Int -> Term Int,
- in an equation for ‘shw’
- at gadt13.hs:15:6-8
- ‘t’ is a rigid type variable bound by
- the inferred type of shw :: Term t1 -> t at gadt13.hs:15:1
- Possible fix: add a type signature for ‘shw’
- Relevant bindings include
- shw :: Term t1 -> t (bound at gadt13.hs:15:1)
- In the expression: ("I " ++) . shows t
- In an equation for ‘shw’: shw (I t) = ("I " ++) . shows t
+
+gadt13.hs:15:13:
+ Couldn't match expected type ‘t’
+ with actual type ‘String -> [Char]’
+ ‘t’ is untouchable
+ inside the constraints (t1 ~ Int)
+ bound by a pattern with constructor: I :: Int -> Term Int,
+ in an equation for ‘shw’
+ at gadt13.hs:15:6-8
+ ‘t’ is a rigid type variable bound by
+ the inferred type of shw :: Term t1 -> t at gadt13.hs:15:1
+ Possible fix: add a type signature for ‘shw’
+ Relevant bindings include
+ shw :: Term t1 -> t (bound at gadt13.hs:15:1)
+ In the expression: ("I " ++) . shows t
+ In an equation for ‘shw’: shw (I t) = ("I " ++) . shows t
diff --git a/testsuite/tests/gadt/gadt21.stderr b/testsuite/tests/gadt/gadt21.stderr
index 9b29cba4c0..878abe2a14 100644
--- a/testsuite/tests/gadt/gadt21.stderr
+++ b/testsuite/tests/gadt/gadt21.stderr
@@ -2,7 +2,7 @@
gadt21.hs:21:60:
Could not deduce (Ord a1) arising from a use of ‘f’
from the context (a ~ Set a1)
- bound by a pattern with constructor
+ bound by a pattern with constructor:
TypeSet :: forall a. Type a -> Type (Set a),
in an equation for ‘withOrdDynExpr’
at gadt21.hs:21:35-43
diff --git a/testsuite/tests/gadt/gadt7.stderr b/testsuite/tests/gadt/gadt7.stderr
index 3fb4a6a72d..2721e9906e 100644
--- a/testsuite/tests/gadt/gadt7.stderr
+++ b/testsuite/tests/gadt/gadt7.stderr
@@ -1,20 +1,19 @@
-
-gadt7.hs:16:38:
- Couldn't match expected type ‘t’ with actual type ‘t1’
- ‘t1’ is untouchable
- inside the constraints (t2 ~ Int)
- bound by a pattern with constructor
- K :: T Int,
- in a case alternative
- at gadt7.hs:16:33
- ‘t1’ is a rigid type variable bound by
- the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1
- ‘t’ is a rigid type variable bound by
- the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1
- Possible fix: add a type signature for ‘i1b’
- Relevant bindings include
- y1 :: t1 (bound at gadt7.hs:16:16)
- y :: t1 (bound at gadt7.hs:16:7)
- i1b :: T t2 -> t1 -> t (bound at gadt7.hs:16:1)
- In the expression: y1
- In a case alternative: K -> y1
+
+gadt7.hs:16:38:
+ Couldn't match expected type ‘t’ with actual type ‘t1’
+ ‘t1’ is untouchable
+ inside the constraints (t2 ~ Int)
+ bound by a pattern with constructor: K :: T Int,
+ in a case alternative
+ at gadt7.hs:16:33
+ ‘t1’ is a rigid type variable bound by
+ the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1
+ ‘t’ is a rigid type variable bound by
+ the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1
+ Possible fix: add a type signature for ‘i1b’
+ Relevant bindings include
+ y1 :: t1 (bound at gadt7.hs:16:16)
+ y :: t1 (bound at gadt7.hs:16:7)
+ i1b :: T t2 -> t1 -> t (bound at gadt7.hs:16:1)
+ In the expression: y1
+ In a case alternative: K -> y1
diff --git a/testsuite/tests/gadt/rw.stderr b/testsuite/tests/gadt/rw.stderr
index 82b1986e54..8b02f5c4d7 100644
--- a/testsuite/tests/gadt/rw.stderr
+++ b/testsuite/tests/gadt/rw.stderr
@@ -2,7 +2,7 @@
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 ()
+ the type signature for: writeInt :: T a -> IORef a -> IO ()
at rw.hs:12:12
Relevant bindings include
ref :: IORef a (bound at rw.hs:13:12)
@@ -15,7 +15,7 @@ rw.hs:14:47:
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 ()
+ the type signature for: readBool :: T a -> IORef a -> IO ()
at rw.hs:16:12
Expected type: a -> Bool
Actual type: Bool -> Bool
diff --git a/testsuite/tests/ghci.debugger/scripts/break003.stderr b/testsuite/tests/ghci.debugger/scripts/break003.stderr
index 7a9c08ec2f..fee6366347 100644
--- a/testsuite/tests/ghci.debugger/scripts/break003.stderr
+++ b/testsuite/tests/ghci.debugger/scripts/break003.stderr
@@ -1,6 +1,6 @@
-
-<interactive>:5:1:
- No instance for (Show (t -> t1))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘print’
- In a stmt of an interactive GHCi command: print it
+
+<interactive>:5:1:
+ No instance for (Show (t -> t1))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘print’
+ In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index 669d271c78..69e098a883 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -20,15 +20,14 @@
../../typecheck/should_run/Defer01.hs:25:4: Warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
- a pattern with constructor
- C2 :: Bool -> C Bool,
+ a pattern with constructor: C2 :: Bool -> C Bool,
in an equation for ‘c’
In the pattern: C2 x
In an equation for ‘c’: c (C2 x) = True
../../typecheck/should_run/Defer01.hs:28:5: Warning:
No instance for (Num (a -> a))
- (maybe you haven't applied enough arguments to a function?)
+ (maybe you haven't applied a function to enough arguments?)
arising from the literal ‘1’
In the expression: 1
In an equation for ‘d’: d = 1
@@ -45,7 +44,7 @@
../../typecheck/should_run/Defer01.hs:34:8: Warning:
Couldn't match expected type ‘Char’ with actual type ‘a’
‘a’ is a rigid type variable bound by
- the type signature for h :: a -> (Char, Char)
+ the type signature for: h :: a -> (Char, Char)
at ../../typecheck/should_run/Defer01.hs:33:6
Relevant bindings include
x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
@@ -82,7 +81,7 @@
../../typecheck/should_run/Defer01.hs:45:6: Warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
- the type signature for k :: (Int ~ Bool) => Int -> Bool
+ the type signature for: k :: (Int ~ Bool) => Int -> Bool
In the ambiguity check for the type signature for ‘k’:
k :: (Int ~ Bool) => Int -> Bool
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
@@ -98,7 +97,7 @@
../../typecheck/should_run/Defer01.hs:45:6: Warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
- the type signature for k :: (Int ~ Bool) => Int -> Bool
+ the type signature for: k :: (Int ~ Bool) => Int -> Bool
../../typecheck/should_run/Defer01.hs:46:7: Warning:
Couldn't match expected type ‘Bool’ with actual type ‘Int’
@@ -138,7 +137,7 @@
In the first argument of ‘print’, namely ‘(c (C2 True))’
*** Exception: ../../typecheck/should_run/Defer01.hs:28:5:
No instance for (Num (a -> a))
- (maybe you haven't applied enough arguments to a function?)
+ (maybe you haven't applied a function to enough arguments?)
arising from the literal ‘1’
In the expression: 1
In an equation for ‘d’: d = 1
@@ -155,7 +154,7 @@
*** Exception: ../../typecheck/should_run/Defer01.hs:34:8:
Couldn't match expected type ‘Char’ with actual type ‘a’
‘a’ is a rigid type variable bound by
- the type signature for h :: a -> (Char, Char)
+ the type signature for: h :: a -> (Char, Char)
at ../../typecheck/should_run/Defer01.hs:33:6
Relevant bindings include
x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
diff --git a/testsuite/tests/ghci/scripts/T2182ghci.stderr b/testsuite/tests/ghci/scripts/T2182ghci.stderr
index 82fbb3188c..6a6eebded2 100644
--- a/testsuite/tests/ghci/scripts/T2182ghci.stderr
+++ b/testsuite/tests/ghci/scripts/T2182ghci.stderr
@@ -1,30 +1,30 @@
-
-<interactive>:3:1:
- No instance for (Show (t0 -> t0))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘print’
- In a stmt of an interactive GHCi command: print it
-
-<interactive>:11:1:
- No instance for (Show (t0 -> t0))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘print’
- In a stmt of an interactive GHCi command: print it
-
-<interactive>:20:1:
- No instance for (Show (t0 -> t0))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘print’
- In a stmt of an interactive GHCi command: print it
-
-<interactive>:29:1:
- No instance for (Show (t0 -> t0))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘print’
- In a stmt of an interactive GHCi command: print it
-
-<interactive>:50:1:
- No instance for (Show (t0 -> t0))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘print’
- In a stmt of an interactive GHCi command: print it
+
+<interactive>:3:1:
+ No instance for (Show (t0 -> t0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘print’
+ In a stmt of an interactive GHCi command: print it
+
+<interactive>:11:1:
+ No instance for (Show (t0 -> t0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘print’
+ In a stmt of an interactive GHCi command: print it
+
+<interactive>:20:1:
+ No instance for (Show (t0 -> t0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘print’
+ In a stmt of an interactive GHCi command: print it
+
+<interactive>:29:1:
+ No instance for (Show (t0 -> t0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘print’
+ In a stmt of an interactive GHCi command: print it
+
+<interactive>:50:1:
+ No instance for (Show (t0 -> t0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘print’
+ In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
index 8d14f3f49c..b76aef8fd4 100644
--- a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
+++ b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
@@ -3,7 +3,7 @@ PushedInAsGivens.hs:10:31:
Couldn't match expected type ‘a1’ with actual type ‘a’
because type variable ‘a1’ would escape its scope
This (rigid, skolem) type variable is bound by
- the type signature for foo :: (F Int ~ [a1]) => a1 -> Int
+ the type signature for: foo :: (F Int ~ [a1]) => a1 -> Int
at PushedInAsGivens.hs:9:20-44
Relevant bindings include
x :: a1 (bound at PushedInAsGivens.hs:10:17)
diff --git a/testsuite/tests/indexed-types/should_compile/Simple14.stderr b/testsuite/tests/indexed-types/should_compile/Simple14.stderr
index 1e430d513b..d3531ac9c5 100644
--- a/testsuite/tests/indexed-types/should_compile/Simple14.stderr
+++ b/testsuite/tests/indexed-types/should_compile/Simple14.stderr
@@ -3,10 +3,10 @@ Simple14.hs:8:8:
Couldn't match type ‘z0’ with ‘z’
‘z0’ is untouchable
inside the constraints (x ~ y)
- bound by the type signature for eqE :: (x ~ y) => EQ_ z0 z0
+ bound by the type signature for: eqE :: (x ~ y) => EQ_ z0 z0
at Simple14.hs:8:8-39
‘z’ is a rigid type variable bound by
- the type signature for eqE :: EQ_ x y -> ((x ~ y) => EQ_ z z) -> p
+ the type signature for: eqE :: EQ_ x y -> ((x ~ y) => EQ_ z z) -> p
at Simple14.hs:8:8
Expected type: EQ_ z0 z0
Actual type: EQ_ z z
diff --git a/testsuite/tests/indexed-types/should_compile/T3208b.stderr b/testsuite/tests/indexed-types/should_compile/T3208b.stderr
index 5ee40a7faf..b476088162 100644
--- a/testsuite/tests/indexed-types/should_compile/T3208b.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T3208b.stderr
@@ -2,8 +2,8 @@
T3208b.hs:15:10:
Could not deduce (STerm o0 ~ OTerm o0)
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
+ bound by the type signature for:
+ fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
at T3208b.hs:14:9-56
The type variable ‘o0’ is ambiguous
In the expression: fce (apply f)
@@ -12,8 +12,8 @@ T3208b.hs:15:10:
T3208b.hs:15:15:
Could not deduce (OTerm o0 ~ OTerm a)
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
+ bound by the type signature for:
+ fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
at T3208b.hs:14:9-56
NB: ‘OTerm’ is a type function, and may not be injective
The type variable ‘o0’ is ambiguous
diff --git a/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr b/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
index c49049b400..2f2d3bff65 100644
--- a/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
+++ b/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
@@ -1,15 +1,14 @@
-
-GADTwrong1.hs:12:21:
- Couldn't match expected type ‘b’ with actual type ‘c’
- ‘c’ is a rigid type variable bound by
- a pattern with constructor
- T :: forall c. c -> T (Const c),
- in a case alternative
- at GADTwrong1.hs:12:14
- ‘b’ is a rigid type variable bound by
- the type signature for coerce :: a -> b at GADTwrong1.hs:10:20
- Relevant bindings include
- y :: c (bound at GADTwrong1.hs:12:16)
- coerce :: a -> b (bound at GADTwrong1.hs:11:1)
- In the expression: y
- In a case alternative: T y -> y
+
+GADTwrong1.hs:12:21:
+ Couldn't match expected type ‘b’ with actual type ‘c’
+ ‘c’ is a rigid type variable bound by
+ a pattern with constructor: T :: forall c. c -> T (Const c),
+ in a case alternative
+ at GADTwrong1.hs:12:14
+ ‘b’ is a rigid type variable bound by
+ the type signature for: coerce :: a -> b at GADTwrong1.hs:10:20
+ Relevant bindings include
+ y :: c (bound at GADTwrong1.hs:12:16)
+ coerce :: a -> b (bound at GADTwrong1.hs:11:1)
+ In the expression: y
+ In a case alternative: T y -> y
diff --git a/testsuite/tests/indexed-types/should_fail/Overlap6.stderr b/testsuite/tests/indexed-types/should_fail/Overlap6.stderr
index 209e2af3e3..1b406e48f1 100644
--- a/testsuite/tests/indexed-types/should_fail/Overlap6.stderr
+++ b/testsuite/tests/indexed-types/should_fail/Overlap6.stderr
@@ -1,13 +1,13 @@
-
-Overlap6.hs:15:7:
- Couldn't match type ‘x’ with ‘And x 'True’
- ‘x’ is a rigid type variable bound by
- the type signature for g :: Proxy x -> Proxy (And x 'True)
- at Overlap6.hs:14:6
- Expected type: Proxy (And x 'True)
- Actual type: Proxy x
- Relevant bindings include
- x :: Proxy x (bound at Overlap6.hs:15:3)
- g :: Proxy x -> Proxy (And x 'True) (bound at Overlap6.hs:15:1)
- In the expression: x
- In an equation for ‘g’: g x = x
+
+Overlap6.hs:15:7:
+ Couldn't match type ‘x’ with ‘And x 'True’
+ ‘x’ is a rigid type variable bound by
+ the type signature for: g :: Proxy x -> Proxy (And x 'True)
+ at Overlap6.hs:14:6
+ Expected type: Proxy (And x 'True)
+ Actual type: Proxy x
+ Relevant bindings include
+ x :: Proxy x (bound at Overlap6.hs:15:3)
+ g :: Proxy x -> Proxy (And x 'True) (bound at Overlap6.hs:15:1)
+ In the expression: x
+ In an equation for ‘g’: g x = x
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr
index dc88c87c74..09df4c2510 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail5a.stderr
@@ -2,7 +2,7 @@
SimpleFail5a.hs:31:11:
Couldn't match type ‘a’ with ‘Int’
‘a’ is a rigid type variable bound by
- the type signature for bar3wrong :: S3 a -> a
+ the type signature for: bar3wrong :: S3 a -> a
at SimpleFail5a.hs:30:14
Expected type: S3 a
Actual type: S3 Int
diff --git a/testsuite/tests/indexed-types/should_fail/T2664.stderr b/testsuite/tests/indexed-types/should_fail/T2664.stderr
index 169c43d312..8d000cae93 100644
--- a/testsuite/tests/indexed-types/should_fail/T2664.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T2664.stderr
@@ -1,21 +1,21 @@
-
-T2664.hs:31:52:
- Could not deduce (a ~ b)
- from the context ((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-12
- ‘a’ is a rigid type variable bound by
- the instance declaration at T2664.hs:22:10
- ‘b’ is a rigid type variable bound by
- the instance declaration at T2664.hs:22:10
- Expected type: Dual (Dual a)
- Actual type: b
- Relevant bindings include
- v :: MVar (Either (PChan a) (PChan b)) (bound at T2664.hs:24:9)
- newPChan :: IO (PChan (a :*: b), PChan c) (bound at T2664.hs:23:5)
- In the third argument of ‘pchoose’, namely ‘newPChan’
- In the first argument of ‘E’, namely ‘(pchoose Right v newPChan)’
- In the expression:
- E (pchoose Right v newPChan) (pchoose Left v newPChan)
+
+T2664.hs:31:52:
+ Could not deduce (a ~ b)
+ from the context ((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-12
+ ‘a’ is a rigid type variable bound by
+ the instance declaration at T2664.hs:22:10
+ ‘b’ is a rigid type variable bound by
+ the instance declaration at T2664.hs:22:10
+ Expected type: Dual (Dual a)
+ Actual type: b
+ Relevant bindings include
+ v :: MVar (Either (PChan a) (PChan b)) (bound at T2664.hs:24:9)
+ newPChan :: IO (PChan (a :*: b), PChan c) (bound at T2664.hs:23:5)
+ In the third argument of ‘pchoose’, namely ‘newPChan’
+ In the first argument of ‘E’, namely ‘(pchoose Right v newPChan)’
+ In the expression:
+ E (pchoose Right v newPChan) (pchoose Left v newPChan)
diff --git a/testsuite/tests/indexed-types/should_fail/T3330a.stderr b/testsuite/tests/indexed-types/should_fail/T3330a.stderr
index 4596f9b7a6..9adb5ad462 100644
--- a/testsuite/tests/indexed-types/should_fail/T3330a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T3330a.stderr
@@ -2,7 +2,7 @@
T3330a.hs:19:34:
Couldn't match type ‘s’ with ‘(->) (s0 ix0 -> ix1)’
‘s’ is a rigid type variable bound by
- the type signature for children :: s ix -> PF s r ix -> [AnyF s]
+ the type signature for: children :: s ix -> PF s r ix -> [AnyF s]
at T3330a.hs:18:13
Expected type: (s0 ix0 -> ix1)
-> r ix1 -> Writer [AnyF s] (r'0 ix1)
@@ -17,7 +17,7 @@ T3330a.hs:19:34:
T3330a.hs:19:34:
Couldn't match type ‘ix’ with ‘r ix1 -> Writer [AnyF s] (r'0 ix1)’
‘ix’ is a rigid type variable bound by
- the type signature for children :: s ix -> PF s r ix -> [AnyF s]
+ the type signature for: children :: s ix -> PF s r ix -> [AnyF s]
at T3330a.hs:18:13
Expected type: (s0 ix0 -> ix1)
-> r ix1 -> Writer [AnyF s] (r'0 ix1)
@@ -32,7 +32,7 @@ T3330a.hs:19:34:
T3330a.hs:19:44:
Couldn't match type ‘ix’ with ‘r0 ix0 -> Writer [AnyF s0] (r0 ix0)’
‘ix’ is a rigid type variable bound by
- the type signature for children :: s ix -> PF s r ix -> [AnyF s]
+ the type signature for: children :: s ix -> PF s r ix -> [AnyF s]
at T3330a.hs:18:13
Expected type: PF s r (r0 ix0 -> Writer [AnyF s0] (r0 ix0))
Actual type: PF s r ix
diff --git a/testsuite/tests/indexed-types/should_fail/T3440.stderr b/testsuite/tests/indexed-types/should_fail/T3440.stderr
index 5e8c7b4f2b..1234d7538b 100644
--- a/testsuite/tests/indexed-types/should_fail/T3440.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T3440.stderr
@@ -1,22 +1,22 @@
-
-T3440.hs:11:22:
- Could not deduce (a1 ~ a)
- 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
- ‘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:10:11
- Relevant bindings include
- y :: Fam a1 (bound at T3440.hs:11:16)
- x :: a1 (bound at T3440.hs:11:14)
- unwrap :: GADT (Fam a) -> (a, Fam a) (bound at T3440.hs:11:1)
- In the expression: x
- In the expression: (x, y)
+
+T3440.hs:11:22:
+ Could not deduce (a1 ~ a)
+ 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
+ ‘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:10:11
+ Relevant bindings include
+ y :: Fam a1 (bound at T3440.hs:11:16)
+ x :: a1 (bound at T3440.hs:11:14)
+ unwrap :: GADT (Fam a) -> (a, Fam a) (bound at T3440.hs:11:1)
+ In the expression: x
+ In the expression: (x, y)
diff --git a/testsuite/tests/indexed-types/should_fail/T4093a.stderr b/testsuite/tests/indexed-types/should_fail/T4093a.stderr
index a2d44151d9..1fa49053f3 100644
--- a/testsuite/tests/indexed-types/should_fail/T4093a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4093a.stderr
@@ -2,7 +2,7 @@
T4093a.hs:7:9:
Could not deduce (Foo e0 ~ Maybe e)
from the context (Foo e ~ Maybe e)
- bound by the type signature for hang :: (Foo e ~ Maybe e) => Foo e
+ bound by the type signature for: hang :: (Foo e ~ Maybe e) => Foo e
at T4093a.hs:7:9-34
The type variable ‘e0’ is ambiguous
Expected type: Foo e
diff --git a/testsuite/tests/indexed-types/should_fail/T4093b.stderr b/testsuite/tests/indexed-types/should_fail/T4093b.stderr
index 7fedfa64d3..9d749d19c6 100644
--- a/testsuite/tests/indexed-types/should_fail/T4093b.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4093b.stderr
@@ -3,16 +3,16 @@ T4093b.hs:31:13:
Could not deduce (e ~ C)
from the context (EitherCO e (A C O n) (A O O n) ~ A e O n,
EitherCO x (A C C n) (A C O n) ~ A C x n)
- bound by the type signature for
- blockToNodeList :: (EitherCO e (A C O n) (A O O n) ~ A e O n,
- EitherCO x (A C C n) (A C O n) ~ A C x n) =>
- Block n e x -> A e x n
+ bound by the type signature for:
+ blockToNodeList :: (EitherCO e (A C O n) (A O O n) ~ A e O n,
+ EitherCO x (A C C n) (A C O n) ~ A C x n) =>
+ Block n e x -> A e x n
at T4093b.hs:(20,3)-(22,26)
‘e’ is a rigid type variable bound by
- the type signature for
- blockToNodeList :: (EitherCO e (A C O n) (A O O n) ~ A e O n,
- EitherCO x (A C C n) (A C O n) ~ A C x n) =>
- Block n e x -> A e x n
+ the type signature for:
+ blockToNodeList :: (EitherCO e (A C O n) (A O O n) ~ A e O n,
+ EitherCO x (A C C n) (A C O n) ~ A C x n) =>
+ Block n e x -> A e x n
at T4093b.hs:20:12
Expected type: EitherCO e (A C O n) (A O O n)
Actual type: (MaybeC C (n C O), MaybeC O (n O C))
diff --git a/testsuite/tests/indexed-types/should_fail/T4174.stderr b/testsuite/tests/indexed-types/should_fail/T4174.stderr
index 6b5ada2932..cc4a7ae5c5 100644
--- a/testsuite/tests/indexed-types/should_fail/T4174.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4174.stderr
@@ -2,8 +2,8 @@
T4174.hs:42:12:
Couldn't match type ‘a’ with ‘SmStep’
‘a’ is a rigid type variable bound by
- the type signature for
- testcase :: Monad m => m (Field (Way (GHC6'8 minor) n t p) a b)
+ the type signature for:
+ testcase :: Monad m => m (Field (Way (GHC6'8 minor) n t p) a b)
at T4174.hs:41:13
Expected type: m (Field (Way (GHC6'8 minor) n t p) a b)
Actual type: m (Field (WayOf m) SmStep RtsSpinLock)
@@ -16,8 +16,8 @@ T4174.hs:42:12:
T4174.hs:42:12:
Couldn't match type ‘b’ with ‘RtsSpinLock’
‘b’ is a rigid type variable bound by
- the type signature for
- testcase :: Monad m => m (Field (Way (GHC6'8 minor) n t p) a b)
+ the type signature for:
+ testcase :: Monad m => m (Field (Way (GHC6'8 minor) n t p) a b)
at T4174.hs:41:13
Expected type: m (Field (Way (GHC6'8 minor) n t p) a b)
Actual type: m (Field (WayOf m) SmStep RtsSpinLock)
diff --git a/testsuite/tests/indexed-types/should_fail/T4272.stderr b/testsuite/tests/indexed-types/should_fail/T4272.stderr
index 1000b9a3f1..74e36f7651 100644
--- a/testsuite/tests/indexed-types/should_fail/T4272.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T4272.stderr
@@ -2,7 +2,7 @@
T4272.hs:15:26:
Couldn't match type ‘a’ with ‘TermFamily a a’
‘a’ is a rigid type variable bound by
- the type signature for laws :: TermLike a => TermFamily a a -> b
+ the type signature for: laws :: TermLike a => TermFamily a a -> b
at T4272.hs:14:16
Expected type: TermFamily a (TermFamily a a)
Actual type: TermFamily a a
diff --git a/testsuite/tests/indexed-types/should_fail/T7194.stderr b/testsuite/tests/indexed-types/should_fail/T7194.stderr
index dece4fb9e7..12df18bc81 100644
--- a/testsuite/tests/indexed-types/should_fail/T7194.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T7194.stderr
@@ -3,7 +3,7 @@ T7194.hs:18:35:
Couldn't match expected type ‘b0’ with actual type ‘F a’
because type variable ‘a’ would escape its scope
This (rigid, skolem) type variable is bound by
- the type signature for g :: C (F a) => a -> Int
+ the type signature for: g :: C (F a) => a -> Int
at T7194.hs:17:23-41
Relevant bindings include
y :: a (bound at T7194.hs:18:20)
diff --git a/testsuite/tests/indexed-types/should_fail/T7786.stderr b/testsuite/tests/indexed-types/should_fail/T7786.stderr
index b081ed69b4..4ce52b45af 100644
--- a/testsuite/tests/indexed-types/should_fail/T7786.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T7786.stderr
@@ -1,13 +1,12 @@
-
-T7786.hs:86:22:
- Couldn't match type ‘xxx’ with ‘'Empty’
- Inaccessible code in
- a pattern with constructor
- Nil :: forall (k :: BOX). Sing 'Empty,
- in a pattern binding in
- 'do' block
- In the pattern: Nil
- In the pattern: Nil :: Sing xxx
- In a stmt of a 'do' block:
- Nil :: Sing xxx <- return
- (buryUnder (dbKeys sub) k Nil `intersectPaths` dbKeys db)
+
+T7786.hs:86:22:
+ Couldn't match type ‘xxx’ with ‘'Empty’
+ Inaccessible code in
+ a pattern with constructor: Nil :: forall (k :: BOX). Sing 'Empty,
+ in a pattern binding in
+ 'do' block
+ In the pattern: Nil
+ In the pattern: Nil :: Sing xxx
+ In a stmt of a 'do' block:
+ Nil :: Sing xxx <- return
+ (buryUnder (dbKeys sub) k Nil `intersectPaths` dbKeys db)
diff --git a/testsuite/tests/indexed-types/should_fail/T9662.stderr b/testsuite/tests/indexed-types/should_fail/T9662.stderr
index 3e84e4ac4a..3093abb1a7 100644
--- a/testsuite/tests/indexed-types/should_fail/T9662.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T9662.stderr
@@ -2,14 +2,14 @@
T9662.hs:49:7:
Couldn't match type ‘k’ with ‘n’
‘k’ is a rigid type variable bound by
- the type signature for
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
+ the type signature for:
+ test :: Shape (((sh :. k) :. m) :. n)
+ -> Shape (((sh :. m) :. n) :. k)
at T9662.hs:44:9
‘n’ is a rigid type variable bound by
- the type signature for
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
+ the type signature for:
+ test :: Shape (((sh :. k) :. m) :. n)
+ -> Shape (((sh :. m) :. n) :. k)
at T9662.hs:44:9
Expected type: Exp (((sh :. m) :. n) :. k)
-> Exp (((sh :. k) :. m) :. n)
@@ -30,14 +30,14 @@ T9662.hs:49:7:
T9662.hs:49:7:
Couldn't match type ‘m’ with ‘k’
‘m’ is a rigid type variable bound by
- the type signature for
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
+ the type signature for:
+ test :: Shape (((sh :. k) :. m) :. n)
+ -> Shape (((sh :. m) :. n) :. k)
at T9662.hs:44:9
‘k’ is a rigid type variable bound by
- the type signature for
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
+ the type signature for:
+ test :: Shape (((sh :. k) :. m) :. n)
+ -> Shape (((sh :. m) :. n) :. k)
at T9662.hs:44:9
Expected type: Exp (((sh :. m) :. n) :. k)
-> Exp (((sh :. k) :. m) :. n)
@@ -58,14 +58,14 @@ T9662.hs:49:7:
T9662.hs:49:7:
Couldn't match type ‘n’ with ‘m’
‘n’ is a rigid type variable bound by
- the type signature for
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
+ the type signature for:
+ test :: Shape (((sh :. k) :. m) :. n)
+ -> Shape (((sh :. m) :. n) :. k)
at T9662.hs:44:9
‘m’ is a rigid type variable bound by
- the type signature for
- test :: Shape (((sh :. k) :. m) :. n)
- -> Shape (((sh :. m) :. n) :. k)
+ the type signature for:
+ test :: Shape (((sh :. k) :. m) :. n)
+ -> Shape (((sh :. m) :. n) :. k)
at T9662.hs:44:9
Expected type: Exp (((sh :. m) :. n) :. k)
-> Exp (((sh :. k) :. m) :. n)
diff --git a/testsuite/tests/parser/should_fail/T7848.stderr b/testsuite/tests/parser/should_fail/T7848.stderr
index 202c66c07e..179ff4f5aa 100644
--- a/testsuite/tests/parser/should_fail/T7848.stderr
+++ b/testsuite/tests/parser/should_fail/T7848.stderr
@@ -1,46 +1,46 @@
-
-T7848.hs:6:57:
- Occurs check: cannot construct the infinite type:
- t2 ~ t0 -> t -> t1 -> A -> A -> A -> A -> t2
- Relevant bindings include
- y :: forall t3. t3 -> t -> t1 -> A -> A -> A -> A -> t2
- (bound at T7848.hs:8:9)
- (&) :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:11:9)
- z :: t1 (bound at T7848.hs:6:12)
- (&) :: t1 (bound at T7848.hs:6:8)
- (+) :: t (bound at T7848.hs:6:3)
- x :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:6:1)
- In the expression: y
- In an equation for ‘x’:
- x (+) ((&)@z) ((:&&) a b) (c :&& d) (e `A` f) (A g h)
- = y
- where
- infixl 3 `y`
- y _ = (&)
- {-# INLINE (&) #-}
- {-# SPECIALIZE (&) :: a #-}
- (&) = x
-
-T7848.hs:10:9:
- Couldn't match type ‘a’ with ‘t -> t1 -> A -> A -> A -> A -> t2’
- ‘a’ is a rigid type variable bound by
- the type signature for (&) :: a at T7848.hs:10:9
- Expected type: forall a. a
- Actual type: t -> t1 -> A -> A -> A -> A -> t2
- Relevant bindings include
- z :: t1 (bound at T7848.hs:6:12)
- (&) :: t1 (bound at T7848.hs:6:8)
- (+) :: t (bound at T7848.hs:6:3)
- x :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:6:1)
- When checking that: t -> t1 -> A -> A -> A -> A -> t2
- is more polymorphic than: forall a. a
- In the SPECIALISE pragma {-# SPECIALIZE (&) :: a #-}
- In an equation for ‘x’:
- x (+) ((&)@z) ((:&&) a b) (c :&& d) (e `A` f) (A g h)
- = y
- where
- infixl 3 `y`
- y _ = (&)
- {-# INLINE (&) #-}
- {-# SPECIALIZE (&) :: a #-}
- (&) = x
+
+T7848.hs:6:57:
+ Occurs check: cannot construct the infinite type:
+ t2 ~ t0 -> t -> t1 -> A -> A -> A -> A -> t2
+ Relevant bindings include
+ y :: forall t3. t3 -> t -> t1 -> A -> A -> A -> A -> t2
+ (bound at T7848.hs:8:9)
+ (&) :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:11:9)
+ z :: t1 (bound at T7848.hs:6:12)
+ (&) :: t1 (bound at T7848.hs:6:8)
+ (+) :: t (bound at T7848.hs:6:3)
+ x :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:6:1)
+ In the expression: y
+ In an equation for ‘x’:
+ x (+) ((&)@z) ((:&&) a b) (c :&& d) (e `A` f) (A g h)
+ = y
+ where
+ infixl 3 `y`
+ y _ = (&)
+ {-# INLINE (&) #-}
+ {-# SPECIALIZE (&) :: a #-}
+ (&) = x
+
+T7848.hs:10:9:
+ Couldn't match type ‘a’ with ‘t -> t1 -> A -> A -> A -> A -> t2’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: (&) :: a at T7848.hs:10:9
+ Expected type: forall a. a
+ Actual type: t -> t1 -> A -> A -> A -> A -> t2
+ Relevant bindings include
+ z :: t1 (bound at T7848.hs:6:12)
+ (&) :: t1 (bound at T7848.hs:6:8)
+ (+) :: t (bound at T7848.hs:6:3)
+ x :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:6:1)
+ When checking that: t -> t1 -> A -> A -> A -> A -> t2
+ is more polymorphic than: forall a. a
+ In the SPECIALISE pragma {-# SPECIALIZE (&) :: a #-}
+ In an equation for ‘x’:
+ x (+) ((&)@z) ((:&&) a b) (c :&& d) (e `A` f) (A g h)
+ = y
+ where
+ infixl 3 `y`
+ y _ = (&)
+ {-# INLINE (&) #-}
+ {-# SPECIALIZE (&) :: a #-}
+ (&) = x
diff --git a/testsuite/tests/partial-sigs/should_fail/AnnotatedConstraint.stderr b/testsuite/tests/partial-sigs/should_fail/AnnotatedConstraint.stderr
index 5211cda013..ef66e7539d 100644
--- a/testsuite/tests/partial-sigs/should_fail/AnnotatedConstraint.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/AnnotatedConstraint.stderr
@@ -1,7 +1,7 @@
-
-AnnotatedConstraint.hs:7:8:
- No instance for (Eq (a0 -> a0))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘foo’
- In the expression: foo id
- In an equation for ‘test’: test = foo id
+
+AnnotatedConstraint.hs:7:8:
+ No instance for (Eq (a0 -> a0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘foo’
+ In the expression: foo id
+ In an equation for ‘test’: test = foo id
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
index 7c61bf6c02..a8c4bc596c 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
@@ -1,21 +1,21 @@
-
-NamedWildcardsNotEnabled.hs:4:9:
- Couldn't match expected type ‘_b’ with actual type ‘Bool’
- ‘_b’ is a rigid type variable bound by
- the type signature for foo :: _a -> _b
- at NamedWildcardsNotEnabled.hs:3:8
- Relevant bindings include
- foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
- In the expression: not x
- In an equation for ‘foo’: foo x = not x
-
-NamedWildcardsNotEnabled.hs:4:13:
- Couldn't match expected type ‘Bool’ with actual type ‘_a’
- ‘_a’ is a rigid type variable bound by
- the type signature for foo :: _a -> _b
- at NamedWildcardsNotEnabled.hs:3:8
- Relevant bindings include
- x :: _a (bound at NamedWildcardsNotEnabled.hs:4:5)
- foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
- In the first argument of ‘not’, namely ‘x’
- In the expression: not x
+
+NamedWildcardsNotEnabled.hs:4:9:
+ Couldn't match expected type ‘_b’ with actual type ‘Bool’
+ ‘_b’ is a rigid type variable bound by
+ the type signature for: foo :: _a -> _b
+ at NamedWildcardsNotEnabled.hs:3:8
+ Relevant bindings include
+ foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
+ In the expression: not x
+ In an equation for ‘foo’: foo x = not x
+
+NamedWildcardsNotEnabled.hs:4:13:
+ Couldn't match expected type ‘Bool’ with actual type ‘_a’
+ ‘_a’ is a rigid type variable bound by
+ the type signature for: foo :: _a -> _b
+ at NamedWildcardsNotEnabled.hs:3:8
+ Relevant bindings include
+ x :: _a (bound at NamedWildcardsNotEnabled.hs:4:5)
+ foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
+ In the first argument of ‘not’, namely ‘x’
+ In the expression: not x
diff --git a/testsuite/tests/polykinds/T7230.stderr b/testsuite/tests/polykinds/T7230.stderr
index 9ec952a7ba..b6af606fe7 100644
--- a/testsuite/tests/polykinds/T7230.stderr
+++ b/testsuite/tests/polykinds/T7230.stderr
@@ -1,28 +1,28 @@
-
-T7230.hs:48:32:
- Could not deduce ((x :<<= x1) ~ 'True)
- from the context (Increasing xs ~ 'True)
- bound by the type signature for
- crash :: (Increasing xs ~ 'True) =>
- SList xs -> SBool (Increasing xs)
- at T7230.hs:47:10-68
- or from (xs ~ (x : xs1))
- bound by a pattern with constructor
- SCons :: forall (k :: BOX) (x :: k) (xs :: [k]).
- Sing x -> Sing xs -> Sing (x : xs),
- in an equation for ‘crash’
- at T7230.hs:48:8-27
- or from (xs1 ~ (x1 : xs2))
- bound by a pattern with constructor
- SCons :: forall (k :: BOX) (x :: k) (xs :: [k]).
- Sing x -> Sing xs -> Sing (x : xs),
- in an equation for ‘crash’
- at T7230.hs:48:17-26
- Expected type: SBool (Increasing xs)
- Actual type: SBool (x :<<= x1)
- Relevant bindings include
- y :: Sing x1 (bound at T7230.hs:48:23)
- x :: Sing x (bound at T7230.hs:48:14)
- In the expression: x %:<<= y
- In an equation for ‘crash’:
- crash (SCons x (SCons y xs)) = x %:<<= y
+
+T7230.hs:48:32:
+ Could not deduce ((x :<<= x1) ~ 'True)
+ from the context (Increasing xs ~ 'True)
+ bound by the type signature for:
+ crash :: (Increasing xs ~ 'True) =>
+ SList xs -> SBool (Increasing xs)
+ at T7230.hs:47:10-68
+ or from (xs ~ (x : xs1))
+ bound by a pattern with constructor:
+ SCons :: forall (k :: BOX) (x :: k) (xs :: [k]).
+ Sing x -> Sing xs -> Sing (x : xs),
+ in an equation for ‘crash’
+ at T7230.hs:48:8-27
+ or from (xs1 ~ (x1 : xs2))
+ bound by a pattern with constructor:
+ SCons :: forall (k :: BOX) (x :: k) (xs :: [k]).
+ Sing x -> Sing xs -> Sing (x : xs),
+ in an equation for ‘crash’
+ at T7230.hs:48:17-26
+ Expected type: SBool (Increasing xs)
+ Actual type: SBool (x :<<= x1)
+ Relevant bindings include
+ y :: Sing x1 (bound at T7230.hs:48:23)
+ x :: Sing x (bound at T7230.hs:48:14)
+ In the expression: x %:<<= y
+ In an equation for ‘crash’:
+ crash (SCons x (SCons y xs)) = x %:<<= y
diff --git a/testsuite/tests/polykinds/T7438.stderr b/testsuite/tests/polykinds/T7438.stderr
index 4616576e0d..d280deb2d8 100644
--- a/testsuite/tests/polykinds/T7438.stderr
+++ b/testsuite/tests/polykinds/T7438.stderr
@@ -1,19 +1,19 @@
-
-T7438.hs:6:14:
- Couldn't match expected type ‘t1’ with actual type ‘t’
- ‘t’ is untouchable
- inside the constraints (t2 ~ t3)
- bound by a pattern with constructor
- Nil :: forall (k :: BOX) (b :: k). Thrist b b,
- in an equation for ‘go’
- at T7438.hs:6:4-6
- ‘t’ is a rigid type variable bound by
- the inferred type of go :: Thrist t2 t3 -> t -> t1 at T7438.hs:6:1
- ‘t1’ is a rigid type variable bound by
- the inferred type of go :: Thrist t2 t3 -> t -> t1 at T7438.hs:6:1
- Possible fix: add a type signature for ‘go’
- Relevant bindings include
- acc :: t (bound at T7438.hs:6:8)
- go :: Thrist t2 t3 -> t -> t1 (bound at T7438.hs:6:1)
- In the expression: acc
- In an equation for ‘go’: go Nil acc = acc
+
+T7438.hs:6:14:
+ Couldn't match expected type ‘t1’ with actual type ‘t’
+ ‘t’ is untouchable
+ inside the constraints (t2 ~ t3)
+ bound by a pattern with constructor:
+ Nil :: forall (k :: BOX) (b :: k). Thrist b b,
+ in an equation for ‘go’
+ at T7438.hs:6:4-6
+ ‘t’ is a rigid type variable bound by
+ the inferred type of go :: Thrist t2 t3 -> t -> t1 at T7438.hs:6:1
+ ‘t1’ is a rigid type variable bound by
+ the inferred type of go :: Thrist t2 t3 -> t -> t1 at T7438.hs:6:1
+ Possible fix: add a type signature for ‘go’
+ Relevant bindings include
+ acc :: t (bound at T7438.hs:6:8)
+ go :: Thrist t2 t3 -> t -> t1 (bound at T7438.hs:6:1)
+ In the expression: acc
+ In an equation for ‘go’: go Nil acc = acc
diff --git a/testsuite/tests/polykinds/T8566.stderr b/testsuite/tests/polykinds/T8566.stderr
index ad0d15e69c..82c1dedd75 100644
--- a/testsuite/tests/polykinds/T8566.stderr
+++ b/testsuite/tests/polykinds/T8566.stderr
@@ -1,19 +1,19 @@
-
-T8566.hs:31:9:
- Could not deduce (C ('AA (t (I a ps)) as) ps fs0)
- arising from a use of ‘c’
- from the context (C ('AA (t (I a ps)) as) ps fs)
- bound by the instance declaration at T8566.hs:29:10-67
- or from ('AA t (a : as) ~ 'AA t1 as1)
- bound by a pattern with constructor
- A :: forall (r :: [*]) (k :: BOX) (t :: k) (as :: [U *]).
- I ('AA t as) r,
- in an equation for ‘c’
- at T8566.hs:31:5
- The type variable ‘fs0’ is ambiguous
- Relevant bindings include
- c :: I ('AA t (a : as)) ps -> I ('AA t (a : as)) ps
- (bound at T8566.hs:31:3)
- In the expression: c undefined
- In an equation for ‘c’: c A = c undefined
- In the instance declaration for ‘C ('AA t (a : as)) ps fs’
+
+T8566.hs:31:9:
+ Could not deduce (C ('AA (t (I a ps)) as) ps fs0)
+ arising from a use of ‘c’
+ from the context (C ('AA (t (I a ps)) as) ps fs)
+ bound by the instance declaration at T8566.hs:29:10-67
+ or from ('AA t (a : as) ~ 'AA t1 as1)
+ bound by a pattern with constructor:
+ A :: forall (r :: [*]) (k :: BOX) (t :: k) (as :: [U *]).
+ I ('AA t as) r,
+ in an equation for ‘c’
+ at T8566.hs:31:5
+ The type variable ‘fs0’ is ambiguous
+ Relevant bindings include
+ c :: I ('AA t (a : as)) ps -> I ('AA t (a : as)) ps
+ (bound at T8566.hs:31:3)
+ In the expression: c undefined
+ In an equation for ‘c’: c A = c undefined
+ In the instance declaration for ‘C ('AA t (a : as)) ps fs’
diff --git a/testsuite/tests/rebindable/rebindable6.stderr b/testsuite/tests/rebindable/rebindable6.stderr
index b9ae82096b..88cf8abac7 100644
--- a/testsuite/tests/rebindable/rebindable6.stderr
+++ b/testsuite/tests/rebindable/rebindable6.stderr
@@ -1,66 +1,66 @@
-
-rebindable6.hs:106:17:
- No instance for (HasSeq (IO a -> t0 -> IO b))
- (maybe you haven't applied enough arguments to a function?)
- arising from a do statement
- The type variable ‘t0’ is ambiguous
- Relevant bindings include
- g :: IO (Maybe b) (bound at rebindable6.hs:104:19)
- f :: IO a (bound at rebindable6.hs:104:17)
- test_do :: IO a -> IO (Maybe b) -> IO b
- (bound at rebindable6.hs:104:9)
- Note: there is a potential instance available:
- instance HasSeq (IO a -> IO b -> IO b)
- -- Defined at rebindable6.hs:52:18
- In a stmt of a 'do' block: f
- 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 (HasFail ([Prelude.Char] -> t1))
- (maybe you haven't applied enough arguments to a function?)
- arising from a do statement
- The type variable ‘t1’ is ambiguous
- Note: there is a potential instance available:
- instance HasFail (String -> IO a)
- -- Defined at rebindable6.hs:57:18
- 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:108:17:
- No instance for (HasReturn (b -> t1))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘return’
- The type variable ‘t1’ is ambiguous
- Relevant bindings include
- b :: b (bound at rebindable6.hs:107:23)
- g :: IO (Maybe b) (bound at rebindable6.hs:104:19)
- test_do :: IO a -> IO (Maybe b) -> IO b
- (bound at rebindable6.hs:104:9)
- Note: there is a potential instance available:
- instance HasReturn (a -> IO a) -- Defined at rebindable6.hs:42:18
- In a stmt of a 'do' block: return b
- 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:106:17:
+ No instance for (HasSeq (IO a -> t0 -> IO b))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a do statement
+ The type variable ‘t0’ is ambiguous
+ Relevant bindings include
+ g :: IO (Maybe b) (bound at rebindable6.hs:104:19)
+ f :: IO a (bound at rebindable6.hs:104:17)
+ test_do :: IO a -> IO (Maybe b) -> IO b
+ (bound at rebindable6.hs:104:9)
+ Note: there is a potential instance available:
+ instance HasSeq (IO a -> IO b -> IO b)
+ -- Defined at rebindable6.hs:52:18
+ In a stmt of a 'do' block: f
+ 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 (HasFail ([Prelude.Char] -> t1))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a do statement
+ The type variable ‘t1’ is ambiguous
+ Note: there is a potential instance available:
+ instance HasFail (String -> IO a)
+ -- Defined at rebindable6.hs:57:18
+ 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:108:17:
+ No instance for (HasReturn (b -> t1))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘return’
+ The type variable ‘t1’ is ambiguous
+ Relevant bindings include
+ b :: b (bound at rebindable6.hs:107:23)
+ g :: IO (Maybe b) (bound at rebindable6.hs:104:19)
+ test_do :: IO a -> IO (Maybe b) -> IO b
+ (bound at rebindable6.hs:104:9)
+ Note: there is a potential instance available:
+ instance HasReturn (a -> IO a) -- Defined at rebindable6.hs:42:18
+ In a stmt of a 'do' block: return b
+ 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 }
diff --git a/testsuite/tests/typecheck/should_compile/FD1.stderr b/testsuite/tests/typecheck/should_compile/FD1.stderr
index 34ea4bff61..2b0ac1733a 100644
--- a/testsuite/tests/typecheck/should_compile/FD1.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD1.stderr
@@ -1,9 +1,9 @@
-
-FD1.hs:16:1:
- Couldn't match expected type ‘Int -> Int’ with actual type ‘a’
- ‘a’ is a rigid type variable bound by
- the type signature for plus :: E a (Int -> Int) => Int -> a
- at FD1.hs:15:9
- Relevant bindings include plus :: Int -> a (bound at FD1.hs:16:1)
- The equation(s) for ‘plus’ have two arguments,
- but its type ‘Int -> a’ has only one
+
+FD1.hs:16:1:
+ Couldn't match expected type ‘Int -> Int’ with actual type ‘a’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: plus :: E a (Int -> Int) => Int -> a
+ at FD1.hs:15:9
+ Relevant bindings include plus :: Int -> a (bound at FD1.hs:16:1)
+ The equation(s) for ‘plus’ have two arguments,
+ but its type ‘Int -> a’ has only one
diff --git a/testsuite/tests/typecheck/should_compile/FD2.stderr b/testsuite/tests/typecheck/should_compile/FD2.stderr
index 9ebfabee3b..0134d87768 100644
--- a/testsuite/tests/typecheck/should_compile/FD2.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD2.stderr
@@ -1,19 +1,19 @@
-
-FD2.hs:26:34:
- Couldn't match expected type ‘e1’ with actual type ‘e’
- ‘e’ is a rigid type variable bound by
- the type signature for
- foldr1 :: Elem a e => (e -> e -> e) -> a -> e
- at FD2.hs:21:13
- ‘e1’ is a rigid type variable bound by
- the type signature for
- mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
- at FD2.hs:24:18
- Relevant bindings include
- y :: e1 (bound at FD2.hs:26:23)
- x :: e1 (bound at FD2.hs:26:15)
- mf :: e1 -> Maybe e1 -> Maybe e1 (bound at FD2.hs:25:12)
- f :: e -> e -> e (bound at FD2.hs:22:10)
- foldr1 :: (e -> e -> e) -> a -> e (bound at FD2.hs:22:3)
- In the first argument of ‘Just’, namely ‘(f x y)’
- In the expression: Just (f x y)
+
+FD2.hs:26:34:
+ Couldn't match expected type ‘e1’ with actual type ‘e’
+ ‘e’ is a rigid type variable bound by
+ the type signature for:
+ foldr1 :: Elem a e => (e -> e -> e) -> a -> e
+ at FD2.hs:21:13
+ ‘e1’ is a rigid type variable bound by
+ the type signature for:
+ mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
+ at FD2.hs:24:18
+ Relevant bindings include
+ y :: e1 (bound at FD2.hs:26:23)
+ x :: e1 (bound at FD2.hs:26:15)
+ mf :: e1 -> Maybe e1 -> Maybe e1 (bound at FD2.hs:25:12)
+ f :: e -> e -> e (bound at FD2.hs:22:10)
+ foldr1 :: (e -> e -> e) -> a -> e (bound at FD2.hs:22:3)
+ 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/FD3.stderr b/testsuite/tests/typecheck/should_compile/FD3.stderr
index 0ba6587273..3bed15a490 100644
--- a/testsuite/tests/typecheck/should_compile/FD3.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD3.stderr
@@ -1,14 +1,14 @@
-
-FD3.hs:15:15:
- Couldn't match type ‘a’ with ‘(String, a)’
- ‘a’ is a rigid type variable bound by
- the type signature for translate :: (String, a) -> A a
- at FD3.hs:14:14
- arising from a functional dependency between:
- constraint ‘MkA (String, a) a’ arising from a use of ‘mkA’
- instance ‘MkA a1 a1’ at FD3.hs:12:10-16
- Relevant bindings include
- a :: (String, a) (bound at FD3.hs:15:11)
- translate :: (String, a) -> A a (bound at FD3.hs:15:1)
- In the expression: mkA a
- In an equation for ‘translate’: translate a = mkA a
+
+FD3.hs:15:15:
+ Couldn't match type ‘a’ with ‘(String, a)’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: translate :: (String, a) -> A a
+ at FD3.hs:14:14
+ arising from a functional dependency between:
+ constraint ‘MkA (String, a) a’ arising from a use of ‘mkA’
+ instance ‘MkA a1 a1’ at FD3.hs:12:10-16
+ Relevant bindings include
+ a :: (String, a) (bound at FD3.hs:15:11)
+ translate :: (String, a) -> A a (bound at FD3.hs:15:1)
+ In the expression: mkA a
+ In an equation for ‘translate’: translate a = mkA a
diff --git a/testsuite/tests/typecheck/should_compile/T7220a.stderr b/testsuite/tests/typecheck/should_compile/T7220a.stderr
index 4be503d001..ef9900ebd8 100644
--- a/testsuite/tests/typecheck/should_compile/T7220a.stderr
+++ b/testsuite/tests/typecheck/should_compile/T7220a.stderr
@@ -1,14 +1,14 @@
-
-T7220a.hs:17:6:
- Could not deduce (C a b)
- from the context (C a0 b, TF b ~ Y)
- bound by the type signature for f :: (C a0 b, TF b ~ Y) => b
- at T7220a.hs:17:6-44
- Possible fix:
- add (C a b) to the context of
- the type signature for f :: (C a0 b, TF b ~ Y) => b
- In the ambiguity check for the type signature for ‘f’:
- f :: forall a. (forall b. (C a b, TF b ~ Y) => b) -> X
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f’:
- f :: (forall b. (C a b, TF b ~ Y) => b) -> X
+
+T7220a.hs:17:6:
+ Could not deduce (C a b)
+ from the context (C a0 b, TF b ~ Y)
+ bound by the type signature for: f :: (C a0 b, TF b ~ Y) => b
+ at T7220a.hs:17:6-44
+ Possible fix:
+ add (C a b) to the context of
+ the type signature for: f :: (C a0 b, TF b ~ Y) => b
+ In the ambiguity check for the type signature for ‘f’:
+ f :: forall a. (forall b. (C a b, TF b ~ Y) => b) -> X
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘f’:
+ f :: (forall b. (C a b, TF b ~ Y) => b) -> X
diff --git a/testsuite/tests/typecheck/should_compile/T9834.stderr b/testsuite/tests/typecheck/should_compile/T9834.stderr
index e4372e596e..534d16d7cb 100644
--- a/testsuite/tests/typecheck/should_compile/T9834.stderr
+++ b/testsuite/tests/typecheck/should_compile/T9834.stderr
@@ -1,71 +1,71 @@
-
-T9834.hs:23:10: Warning:
- Couldn't match type ‘p’ with ‘(->) (p a0)’
- ‘p’ is a rigid type variable bound by
- the class declaration for ‘ApplicativeFix’ at T9834.hs:21:39
- Expected type: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- Actual type: (forall (q :: * -> *).
- Applicative q =>
- Nat (Comp p q) (Comp p q))
- -> p a0 -> p a0
- Relevant bindings include
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- (bound at T9834.hs:23:3)
- In the expression: wrapIdComp
- In an equation for ‘afix’: afix = wrapIdComp
-
-T9834.hs:23:10: Warning:
- Couldn't match type ‘a’ with ‘p a0’
- ‘a’ is a rigid type variable bound by
- the type signature for
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- at T9834.hs:22:11
- Expected type: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- Actual type: (forall (q :: * -> *).
- Applicative q =>
- Nat (Comp p q) (Comp p q))
- -> p a0 -> p a0
- Relevant bindings include
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- (bound at T9834.hs:23:3)
- In the expression: wrapIdComp
- In an equation for ‘afix’: afix = wrapIdComp
-
-T9834.hs:23:10: Warning:
- Couldn't match type ‘a’ with ‘a1’
- ‘a’ is a rigid type variable bound by
- the type signature for
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- at T9834.hs:22:11
- ‘a1’ is a rigid type variable bound by
- a type expected by the context:
- Applicative q => Comp p q a1 -> Comp p q a1
- at T9834.hs:23:10
- Expected type: Comp p q a1 -> Comp p q a1
- Actual type: Comp p q a -> Comp p q a
- Relevant bindings include
- afix :: (forall (q :: * -> *).
- Applicative q =>
- Comp p q a -> Comp p q a)
- -> p a
- (bound at T9834.hs:23:3)
- In the expression: wrapIdComp
- In an equation for ‘afix’: afix = wrapIdComp
+
+T9834.hs:23:10: Warning:
+ Couldn't match type ‘p’ with ‘(->) (p a0)’
+ ‘p’ is a rigid type variable bound by
+ the class declaration for ‘ApplicativeFix’ at T9834.hs:21:39
+ Expected type: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ Actual type: (forall (q :: * -> *).
+ Applicative q =>
+ Nat (Comp p q) (Comp p q))
+ -> p a0 -> p a0
+ Relevant bindings include
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ (bound at T9834.hs:23:3)
+ In the expression: wrapIdComp
+ In an equation for ‘afix’: afix = wrapIdComp
+
+T9834.hs:23:10: Warning:
+ Couldn't match type ‘a’ with ‘p a0’
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ at T9834.hs:22:11
+ Expected type: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ Actual type: (forall (q :: * -> *).
+ Applicative q =>
+ Nat (Comp p q) (Comp p q))
+ -> p a0 -> p a0
+ Relevant bindings include
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ (bound at T9834.hs:23:3)
+ In the expression: wrapIdComp
+ In an equation for ‘afix’: afix = wrapIdComp
+
+T9834.hs:23:10: Warning:
+ Couldn't match type ‘a’ with ‘a1’
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ at T9834.hs:22:11
+ ‘a1’ is a rigid type variable bound by
+ a type expected by the context:
+ Applicative q => Comp p q a1 -> Comp p q a1
+ at T9834.hs:23:10
+ Expected type: Comp p q a1 -> Comp p q a1
+ Actual type: Comp p q a -> Comp p q a
+ Relevant bindings include
+ afix :: (forall (q :: * -> *).
+ Applicative q =>
+ Comp p q a -> Comp p q a)
+ -> p a
+ (bound at T9834.hs:23:3)
+ In the expression: wrapIdComp
+ In an equation for ‘afix’: afix = wrapIdComp
diff --git a/testsuite/tests/typecheck/should_compile/tc141.stderr b/testsuite/tests/typecheck/should_compile/tc141.stderr
index 9279d033b5..07adbfce6b 100644
--- a/testsuite/tests/typecheck/should_compile/tc141.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc141.stderr
@@ -36,7 +36,7 @@ tc141.hs:15:18:
Couldn't match expected type ‘a2’ with actual type ‘t’
because type variable ‘a2’ would escape its scope
This (rigid, skolem) type variable is bound by
- the type signature for v :: a2
+ the type signature for: v :: a2
at tc141.hs:14:19
Relevant bindings include
v :: a2 (bound at tc141.hs:15:14)
diff --git a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
index 895cc7df01..52e8d8a4eb 100644
--- a/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
+++ b/testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
@@ -4,7 +4,7 @@ FDsFromGivens.hs:21:15:
arising from a functional dependency between constraints:
‘C Char [a]’ arising from a use of ‘f’ at FDsFromGivens.hs:21:15
‘C Char Char’
- arising from a pattern with constructor
+ arising from a pattern with constructor:
KCC :: C Char Char => () -> KCC,
in an equation for ‘bar’
at FDsFromGivens.hs:21:6-10
diff --git a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
index 5ccc035c76..f06ee68043 100644
--- a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
+++ b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr
@@ -1,12 +1,12 @@
-
-FailDueToGivenOverlapping.hs:27:9:
- Overlapping instances for E [t0] arising from a use of ‘eop’
- Matching givens (or their superclasses):
- (E [Int])
- bound by the type signature for bar :: E [Int] => () -> ()
- at FailDueToGivenOverlapping.hs:26:8-26
- Matching instances:
- instance E [a] -- Defined at FailDueToGivenOverlapping.hs:21:10
- (The choice depends on the instantiation of ‘t0’)
- In the expression: eop [undefined]
- In an equation for ‘bar’: bar _ = eop [undefined]
+
+FailDueToGivenOverlapping.hs:27:9:
+ Overlapping instances for E [t0] arising from a use of ‘eop’
+ Matching givens (or their superclasses):
+ (E [Int])
+ bound by the type signature for: bar :: E [Int] => () -> ()
+ at FailDueToGivenOverlapping.hs:26:8-26
+ Matching instances:
+ instance E [a] -- Defined at FailDueToGivenOverlapping.hs:21:10
+ (The choice depends on the instantiation of ‘t0’)
+ In the expression: eop [undefined]
+ In an equation for ‘bar’: bar _ = eop [undefined]
diff --git a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
index 1261408eb8..ff39e7e6ef 100644
--- a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
+++ b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
@@ -1,53 +1,52 @@
-
-FrozenErrorTests.hs:12: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:26:9:
- Occurs check: cannot construct the infinite type: a ~ [a]
- Expected type: [a]
- Actual type: F a Bool
- Relevant bindings include
- test1 :: a (bound at FrozenErrorTests.hs:26:1)
- In the expression: goo1 False undefined
- In an equation for ‘test1’: test1 = goo1 False undefined
-
-FrozenErrorTests.hs:29: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:30: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:45:15:
- Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
- Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
- Actual type: F (T2 (T2 c c) c) Bool
- Relevant bindings include
- test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1)
- In the first argument of ‘goo4’, namely ‘(goo3 False undefined)’
- In the expression: goo4 (goo3 False undefined)
- In an equation for ‘test4’: test4 = goo4 (goo3 False undefined)
-
-FrozenErrorTests.hs:46:9:
- Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
- Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
- Actual type: F (T2 (T2 c c) c) Bool
- Relevant bindings include
- test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1)
- In the expression: goo3 False (goo4 undefined)
- In an equation for ‘test5’: test5 = goo3 False (goo4 undefined)
+
+FrozenErrorTests.hs:12: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:26:9:
+ Occurs check: cannot construct the infinite type: a ~ [a]
+ Expected type: [a]
+ Actual type: F a Bool
+ Relevant bindings include
+ test1 :: a (bound at FrozenErrorTests.hs:26:1)
+ In the expression: goo1 False undefined
+ In an equation for ‘test1’: test1 = goo1 False undefined
+
+FrozenErrorTests.hs:29: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:30: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:45:15:
+ Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
+ Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
+ Actual type: F (T2 (T2 c c) c) Bool
+ Relevant bindings include
+ test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1)
+ In the first argument of ‘goo4’, namely ‘(goo3 False undefined)’
+ In the expression: goo4 (goo3 False undefined)
+ In an equation for ‘test4’: test4 = goo4 (goo3 False undefined)
+
+FrozenErrorTests.hs:46:9:
+ Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
+ Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
+ Actual type: F (T2 (T2 c c) c) Bool
+ Relevant bindings include
+ test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1)
+ In the expression: goo3 False (goo4 undefined)
+ In an equation for ‘test5’: test5 = goo3 False (goo4 undefined)
diff --git a/testsuite/tests/typecheck/should_fail/IPFail.stderr b/testsuite/tests/typecheck/should_fail/IPFail.stderr
index c617cfb776..1af8948019 100644
--- a/testsuite/tests/typecheck/should_fail/IPFail.stderr
+++ b/testsuite/tests/typecheck/should_fail/IPFail.stderr
@@ -1,9 +1,9 @@
-
-IPFail.hs:6:18:
- Could not deduce (Num Bool) arising from the literal ‘5’
- from the context (?x::Int)
- bound by the type signature for f0 :: (?x::Int) => () -> Bool
- at IPFail.hs:5:7-31
- In the expression: 5
- In the expression: let ?x = 5 in ?x
- In an equation for ‘f0’: f0 () = let ?x = 5 in ?x
+
+IPFail.hs:6:18:
+ Could not deduce (Num Bool) arising from the literal ‘5’
+ from the context (?x::Int)
+ bound by the type signature for: f0 :: (?x::Int) => () -> Bool
+ at IPFail.hs:5:7-31
+ In the expression: 5
+ In the expression: let ?x = 5 in ?x
+ In an equation for ‘f0’: f0 () = let ?x = 5 in ?x
diff --git a/testsuite/tests/typecheck/should_fail/T1899.stderr b/testsuite/tests/typecheck/should_fail/T1899.stderr
index 324eebbc9a..37e7b23d73 100644
--- a/testsuite/tests/typecheck/should_fail/T1899.stderr
+++ b/testsuite/tests/typecheck/should_fail/T1899.stderr
@@ -1,13 +1,13 @@
-
-T1899.hs:14:36:
- Couldn't match type ‘a’ with ‘Proposition a1’
- ‘a’ is a rigid type variable bound by
- the type signature for transRHS :: [a] -> Int -> Constraint a
- at T1899.hs:9:14
- Expected type: [Proposition a1]
- Actual type: [a]
- Relevant bindings include
- varSet :: [a] (bound at T1899.hs:10:11)
- transRHS :: [a] -> Int -> Constraint a (bound at T1899.hs:10:2)
- In the first argument of ‘Auxiliary’, namely ‘varSet’
- In the first argument of ‘Prop’, namely ‘(Auxiliary varSet)’
+
+T1899.hs:14:36:
+ Couldn't match type ‘a’ with ‘Proposition a1’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: transRHS :: [a] -> Int -> Constraint a
+ at T1899.hs:9:14
+ Expected type: [Proposition a1]
+ Actual type: [a]
+ Relevant bindings include
+ varSet :: [a] (bound at T1899.hs:10:11)
+ transRHS :: [a] -> Int -> Constraint a (bound at T1899.hs:10:2)
+ In the first argument of ‘Auxiliary’, namely ‘varSet’
+ In the first argument of ‘Prop’, namely ‘(Auxiliary varSet)’
diff --git a/testsuite/tests/typecheck/should_fail/T2714.stderr b/testsuite/tests/typecheck/should_fail/T2714.stderr
index df64852557..65aa78cd90 100644
--- a/testsuite/tests/typecheck/should_fail/T2714.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2714.stderr
@@ -1,24 +1,24 @@
-
-T2714.hs:8:5:
- Couldn't match type ‘a’ with ‘f0 b’
- ‘a’ is a rigid type variable bound by
- the type signature for f :: ((a -> b) -> b) -> forall c. c -> a
- at T2714.hs:7:6
- Expected type: ((a -> b) -> b) -> c -> a
- Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
- Relevant bindings include
- f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
- In the expression: ffmap
- In an equation for ‘f’: f = ffmap
-
-T2714.hs:8:5:
- Couldn't match type ‘c’ with ‘f0 (a -> b)’
- ‘c’ is a rigid type variable bound by
- the type signature for f :: ((a -> b) -> b) -> c -> a
- at T2714.hs:8:1
- Expected type: ((a -> b) -> b) -> c -> a
- Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
- Relevant bindings include
- f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
- In the expression: ffmap
- In an equation for ‘f’: f = ffmap
+
+T2714.hs:8:5:
+ Couldn't match type ‘a’ with ‘f0 b’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: f :: ((a -> b) -> b) -> forall c. c -> a
+ at T2714.hs:7:6
+ Expected type: ((a -> b) -> b) -> c -> a
+ Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
+ Relevant bindings include
+ f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
+ In the expression: ffmap
+ In an equation for ‘f’: f = ffmap
+
+T2714.hs:8:5:
+ Couldn't match type ‘c’ with ‘f0 (a -> b)’
+ ‘c’ is a rigid type variable bound by
+ the type signature for: f :: ((a -> b) -> b) -> c -> a
+ at T2714.hs:8:1
+ Expected type: ((a -> b) -> b) -> c -> a
+ Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
+ Relevant bindings include
+ f :: ((a -> b) -> b) -> forall c. c -> a (bound at T2714.hs:8:1)
+ In the expression: ffmap
+ In an equation for ‘f’: f = ffmap
diff --git a/testsuite/tests/typecheck/should_fail/T2846b.stderr b/testsuite/tests/typecheck/should_fail/T2846b.stderr
index ccf4f149ee..3008346ddd 100644
--- a/testsuite/tests/typecheck/should_fail/T2846b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2846b.stderr
@@ -1,7 +1,7 @@
-
-T2846b.hs:5:5:
- No instance for (Show (Num a0 => a0))
- (maybe you haven't applied enough arguments to a function?)
- arising from a use of ‘show’
- In the expression: show ([1, 2, 3] :: [Num a => a])
- In an equation for ‘f’: f = show ([1, 2, 3] :: [Num a => a])
+
+T2846b.hs:5:5:
+ No instance for (Show (Num a0 => a0))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘show’
+ In the expression: show ([1, 2, 3] :: [Num a => a])
+ In an equation for ‘f’: f = show ([1, 2, 3] :: [Num a => a])
diff --git a/testsuite/tests/typecheck/should_fail/T3592.stderr b/testsuite/tests/typecheck/should_fail/T3592.stderr
index 05ea89a064..e55b693b15 100644
--- a/testsuite/tests/typecheck/should_fail/T3592.stderr
+++ b/testsuite/tests/typecheck/should_fail/T3592.stderr
@@ -1,16 +1,16 @@
-
-T3592.hs:8:5:
- No instance for (Show a) arising from a use of ‘show’
- Possible fix:
- add (Show a) to the context of
- the type signature for f :: T a -> String
- In the expression: show
- In an equation for ‘f’: f = show
-
-T3592.hs:11:7:
- No instance for (Show a) arising from a use of ‘show’
- Possible fix:
- add (Show a) to the context of
- the type signature for g :: T a -> String
- In the expression: show x
- In an equation for ‘g’: g x = show x
+
+T3592.hs:8:5:
+ No instance for (Show a) arising from a use of ‘show’
+ Possible fix:
+ add (Show a) to the context of
+ the type signature for: f :: T a -> String
+ In the expression: show
+ In an equation for ‘f’: f = show
+
+T3592.hs:11:7:
+ No instance for (Show a) arising from a use of ‘show’
+ Possible fix:
+ add (Show a) to the context of
+ the type signature for: g :: T a -> String
+ In the expression: show x
+ In an equation for ‘g’: g x = show x
diff --git a/testsuite/tests/typecheck/should_fail/T5236.stderr b/testsuite/tests/typecheck/should_fail/T5236.stderr
index 7b5830c0ea..c1cbae3699 100644
--- a/testsuite/tests/typecheck/should_fail/T5236.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5236.stderr
@@ -1,11 +1,11 @@
-
-T5236.hs:13:9:
- Couldn't match type ‘B’ with ‘A’
- arising from a functional dependency between:
- constraint ‘Id A B’
- arising from the type signature for loop :: Id A B => Bool
- instance ‘Id B B’ at T5236.hs:11:10-15
- In the ambiguity check for the type signature for ‘loop’:
- loop :: Id A B => Bool
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘loop’: loop :: Id A B => Bool
+
+T5236.hs:13:9:
+ Couldn't match type ‘B’ with ‘A’
+ arising from a functional dependency between:
+ constraint ‘Id A B’
+ arising from the type signature for: loop :: Id A B => Bool
+ instance ‘Id B B’ at T5236.hs:11:10-15
+ In the ambiguity check for the type signature for ‘loop’:
+ loop :: Id A B => Bool
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘loop’: loop :: Id A B => Bool
diff --git a/testsuite/tests/typecheck/should_fail/T5300.stderr b/testsuite/tests/typecheck/should_fail/T5300.stderr
index 14e069af9b..2adbed420b 100644
--- a/testsuite/tests/typecheck/should_fail/T5300.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5300.stderr
@@ -1,32 +1,32 @@
-
-T5300.hs:11:7:
- Could not deduce (C1 a b c0)
- from the context (Monad m, C1 a b c)
- bound by the type signature for
- f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
- at T5300.hs:11:7-50
- The type variable ‘c0’ is ambiguous
- In the ambiguity check for the type signature for ‘f1’:
- f1 :: forall a b (m :: * -> *) c.
- (Monad m, C1 a b c) =>
- a -> StateT (T b) m a
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f1’:
- f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
-
-T5300.hs:14:7:
- Could not deduce (C2 a2 b2 c20)
- from the context (Monad m, C1 a1 b1 c1, C2 a2 b2 c2)
- bound by the type signature for
- f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
- a1 -> StateT (T b2) m a2
- at T5300.hs:14:7-69
- The type variable ‘c20’ is ambiguous
- In the ambiguity check for the type signature for ‘f2’:
- f2 :: forall a1 b2 (m :: * -> *) a2 b1 c1 c2.
- (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
- a1 -> StateT (T b2) m a2
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f2’:
- f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
- a1 -> StateT (T b2) m a2
+
+T5300.hs:11:7:
+ Could not deduce (C1 a b c0)
+ from the context (Monad m, C1 a b c)
+ bound by the type signature for:
+ f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
+ at T5300.hs:11:7-50
+ The type variable ‘c0’ is ambiguous
+ In the ambiguity check for the type signature for ‘f1’:
+ f1 :: forall a b (m :: * -> *) c.
+ (Monad m, C1 a b c) =>
+ a -> StateT (T b) m a
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘f1’:
+ f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
+
+T5300.hs:14:7:
+ Could not deduce (C2 a2 b2 c20)
+ from the context (Monad m, C1 a1 b1 c1, C2 a2 b2 c2)
+ bound by the type signature for:
+ f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
+ a1 -> StateT (T b2) m a2
+ at T5300.hs:14:7-69
+ The type variable ‘c20’ is ambiguous
+ In the ambiguity check for the type signature for ‘f2’:
+ f2 :: forall a1 b2 (m :: * -> *) a2 b1 c1 c2.
+ (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
+ a1 -> StateT (T b2) m a2
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘f2’:
+ f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
+ a1 -> StateT (T b2) m a2
diff --git a/testsuite/tests/typecheck/should_fail/T7453.stderr b/testsuite/tests/typecheck/should_fail/T7453.stderr
index c474460155..2b891773c4 100644
--- a/testsuite/tests/typecheck/should_fail/T7453.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7453.stderr
@@ -1,45 +1,45 @@
-
-T7453.hs:10:30:
- Couldn't match expected type ‘t1’ with actual type ‘t’
- because type variable ‘t1’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for z :: Id t1
- at T7453.hs:8:16-19
- Relevant bindings include
- aux :: Id t1 (bound at T7453.hs:10:21)
- z :: Id t1 (bound at T7453.hs:9:11)
- v :: t (bound at T7453.hs:7:7)
- cast1 :: t -> a (bound at T7453.hs:7:1)
- In the first argument of ‘Id’, namely ‘v’
- In the expression: Id v
-
-T7453.hs:16:33:
- Couldn't match expected type ‘t2’ with actual type ‘t’
- because type variable ‘t2’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for z :: () -> t2
- at T7453.hs:14:16-22
- Relevant bindings include
- aux :: b -> t2 (bound at T7453.hs:16:21)
- z :: () -> t2 (bound at T7453.hs:15:11)
- v :: t (bound at T7453.hs:13:7)
- cast2 :: t -> t1 (bound at T7453.hs:13:1)
- In the first argument of ‘const’, namely ‘v’
- In the expression: const v
-
-T7453.hs:21:15:
- Couldn't match expected type ‘t1’ with actual type ‘a’
- because type variable ‘t1’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type signature for z :: t1
- at T7453.hs:20:16
- Relevant bindings include
- aux :: forall b. b -> a (bound at T7453.hs:22:21)
- z :: t1 (bound at T7453.hs:21:11)
- v :: a (bound at T7453.hs:19:7)
- cast3 :: a -> t (bound at T7453.hs:19:1)
- In the expression: v
- In an equation for ‘z’:
- z = v
- where
- aux = const v
+
+T7453.hs:10:30:
+ Couldn't match expected type ‘t1’ with actual type ‘t’
+ because type variable ‘t1’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for: z :: Id t1
+ at T7453.hs:8:16-19
+ Relevant bindings include
+ aux :: Id t1 (bound at T7453.hs:10:21)
+ z :: Id t1 (bound at T7453.hs:9:11)
+ v :: t (bound at T7453.hs:7:7)
+ cast1 :: t -> a (bound at T7453.hs:7:1)
+ In the first argument of ‘Id’, namely ‘v’
+ In the expression: Id v
+
+T7453.hs:16:33:
+ Couldn't match expected type ‘t2’ with actual type ‘t’
+ because type variable ‘t2’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for: z :: () -> t2
+ at T7453.hs:14:16-22
+ Relevant bindings include
+ aux :: b -> t2 (bound at T7453.hs:16:21)
+ z :: () -> t2 (bound at T7453.hs:15:11)
+ v :: t (bound at T7453.hs:13:7)
+ cast2 :: t -> t1 (bound at T7453.hs:13:1)
+ In the first argument of ‘const’, namely ‘v’
+ In the expression: const v
+
+T7453.hs:21:15:
+ Couldn't match expected type ‘t1’ with actual type ‘a’
+ because type variable ‘t1’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for: z :: t1
+ at T7453.hs:20:16
+ Relevant bindings include
+ aux :: forall b. b -> a (bound at T7453.hs:22:21)
+ z :: t1 (bound at T7453.hs:21:11)
+ v :: a (bound at T7453.hs:19:7)
+ cast3 :: a -> t (bound at T7453.hs:19:1)
+ In the expression: v
+ In an equation for ‘z’:
+ z = v
+ where
+ aux = const v
diff --git a/testsuite/tests/typecheck/should_fail/T7748a.stderr b/testsuite/tests/typecheck/should_fail/T7748a.stderr
index 63cff4aa17..a8e2921a92 100644
--- a/testsuite/tests/typecheck/should_fail/T7748a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7748a.stderr
@@ -1,18 +1,18 @@
-
-T7748a.hs:16:24:
- Couldn't match expected type ‘a’
- with actual type ‘Maybe (Maybe (r -> ()))’
- ‘a’ is a rigid type variable bound by
- the type signature for test :: a -> r -> () at T7748a.hs:11:9
- Relevant bindings include
- g :: r -> () (bound at T7748a.hs:13:16)
- f :: r -> () (bound at T7748a.hs:13:8)
- zd :: a (bound at T7748a.hs:12:6)
- test :: a -> r -> () (bound at T7748a.hs:12:1)
- In the pattern: Just (Just p)
- In a case alternative: Just (Just p) -> p
- In the expression:
- case zd of {
- Nothing -> const ()
- Just Nothing -> const ()
- Just (Just p) -> p }
+
+T7748a.hs:16:24:
+ Couldn't match expected type ‘a’
+ with actual type ‘Maybe (Maybe (r -> ()))’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: test :: a -> r -> () at T7748a.hs:11:9
+ Relevant bindings include
+ g :: r -> () (bound at T7748a.hs:13:16)
+ f :: r -> () (bound at T7748a.hs:13:8)
+ zd :: a (bound at T7748a.hs:12:6)
+ test :: a -> r -> () (bound at T7748a.hs:12:1)
+ In the pattern: Just (Just p)
+ In a case alternative: Just (Just p) -> p
+ In the expression:
+ case zd of {
+ Nothing -> const ()
+ Just Nothing -> const ()
+ Just (Just p) -> p }
diff --git a/testsuite/tests/typecheck/should_fail/T8392a.stderr b/testsuite/tests/typecheck/should_fail/T8392a.stderr
index a51cc83932..290ae86a00 100644
--- a/testsuite/tests/typecheck/should_fail/T8392a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8392a.stderr
@@ -1,8 +1,8 @@
-
-T8392a.hs:6:8:
- Couldn't match type ‘Int’ with ‘Bool’
- Inaccessible code in
- the type signature for foo :: (Int ~ Bool) => a -> a
- In the ambiguity check for the type signature for ‘foo’:
- foo :: forall a. (Int ~ Bool) => a -> a
- In the type signature for ‘foo’: foo :: (Int ~ Bool) => a -> a
+
+T8392a.hs:6:8:
+ Couldn't match type ‘Int’ with ‘Bool’
+ Inaccessible code in
+ the type signature for: foo :: (Int ~ Bool) => a -> a
+ In the ambiguity check for the type signature for ‘foo’:
+ foo :: forall a. (Int ~ Bool) => a -> a
+ In the type signature for ‘foo’: foo :: (Int ~ Bool) => a -> a
diff --git a/testsuite/tests/typecheck/should_fail/T8450.stderr b/testsuite/tests/typecheck/should_fail/T8450.stderr
index 2cc9a6b7ab..1416f2aec2 100644
--- a/testsuite/tests/typecheck/should_fail/T8450.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8450.stderr
@@ -1,9 +1,9 @@
-
-T8450.hs:8:7:
- Couldn't match expected type ‘a’ with actual type ‘()’
- ‘a’ is a rigid type variable bound by
- the type signature for run :: a at T8450.hs:7:15
- Relevant bindings include run :: a (bound at T8450.hs:8:1)
- In the expression: runEffect $ (undefined :: Either a ())
- In an equation for ‘run’:
- run = runEffect $ (undefined :: Either a ())
+
+T8450.hs:8:7:
+ Couldn't match expected type ‘a’ with actual type ‘()’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: run :: a at T8450.hs:7:15
+ Relevant bindings include run :: a (bound at T8450.hs:8:1)
+ In the expression: runEffect $ (undefined :: Either a ())
+ In an equation for ‘run’:
+ run = runEffect $ (undefined :: Either a ())
diff --git a/testsuite/tests/typecheck/should_fail/T9109.stderr b/testsuite/tests/typecheck/should_fail/T9109.stderr
index 5ef2340a74..3f5236b778 100644
--- a/testsuite/tests/typecheck/should_fail/T9109.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9109.stderr
@@ -1,15 +1,14 @@
-
-T9109.hs:8:13:
- Couldn't match expected type ‘t’ with actual type ‘Bool’
- ‘t’ is untouchable
- inside the constraints (t1 ~ Bool)
- bound by a pattern with constructor
- GBool :: G Bool,
- in an equation for ‘foo’
- at T9109.hs:8:5-9
- ‘t’ is a rigid type variable bound by
- the inferred type of foo :: G t1 -> t at T9109.hs:8:1
- Possible fix: add a type signature for ‘foo’
- Relevant bindings include foo :: G t1 -> t (bound at T9109.hs:8:1)
- In the expression: True
- In an equation for ‘foo’: foo GBool = True
+
+T9109.hs:8:13:
+ Couldn't match expected type ‘t’ with actual type ‘Bool’
+ ‘t’ is untouchable
+ inside the constraints (t1 ~ Bool)
+ bound by a pattern with constructor: GBool :: G Bool,
+ in an equation for ‘foo’
+ at T9109.hs:8:5-9
+ ‘t’ is a rigid type variable bound by
+ the inferred type of foo :: G t1 -> t at T9109.hs:8:1
+ Possible fix: add a type signature for ‘foo’
+ Relevant bindings include foo :: G t1 -> t (bound at T9109.hs:8:1)
+ In the expression: True
+ In an equation for ‘foo’: foo GBool = True
diff --git a/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr b/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr
index f11ec28f18..ead183c7a1 100644
--- a/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr
+++ b/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr
@@ -1,14 +1,14 @@
-
-TcStaticPointersFail02.hs:9:6:
- No instance for (Data.Typeable.Internal.Typeable b)
- arising from a static form
- In the expression: static (undefined :: (forall a. a -> a) -> b)
- In an equation for ‘f1’:
- f1 = static (undefined :: (forall a. a -> a) -> b)
-
-TcStaticPointersFail02.hs:12:6:
- No instance for (Data.Typeable.Internal.Typeable Monad)
- (maybe you haven't applied enough arguments to a function?)
- arising from a static form
- In the expression: static return
- In an equation for ‘f2’: f2 = static return
+
+TcStaticPointersFail02.hs:9:6:
+ No instance for (Data.Typeable.Internal.Typeable b)
+ arising from a static form
+ In the expression: static (undefined :: (forall a. a -> a) -> b)
+ In an equation for ‘f1’:
+ f1 = static (undefined :: (forall a. a -> a) -> b)
+
+TcStaticPointersFail02.hs:12:6:
+ No instance for (Data.Typeable.Internal.Typeable Monad)
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a static form
+ In the expression: static return
+ In an equation for ‘f2’: f2 = static return
diff --git a/testsuite/tests/typecheck/should_fail/mc22.stderr b/testsuite/tests/typecheck/should_fail/mc22.stderr
index ebae89eb9b..785bf07b76 100644
--- a/testsuite/tests/typecheck/should_fail/mc22.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc22.stderr
@@ -1,21 +1,21 @@
-
-mc22.hs:10:9:
- No instance for (Functor t) arising from a use of ‘fmap’
- Possible fix:
- add (Functor t) to the context of
- a type expected by the context: (a -> b) -> t a -> t b
- or the inferred type of foo :: [t [Char]]
- 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 ‘t a’
- ‘a’ is a rigid type variable bound by
- a type expected by the context: [a] -> [t a] at mc22.hs:10:9
- Expected type: [a] -> [t a]
- Actual type: [t a] -> [t a]
- Relevant bindings include foo :: [t [Char]] (bound at mc22.hs:8:1)
- In the expression: take 5
- In a stmt of a monad comprehension: then group using take 5
+
+mc22.hs:10:9:
+ No instance for (Functor t) arising from a use of ‘fmap’
+ Possible fix:
+ add (Functor t) to the context of
+ a type expected by the context: (a -> b) -> t a -> t b
+ or the inferred type of foo :: [t [Char]]
+ 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 ‘t a’
+ ‘a’ is a rigid type variable bound by
+ a type expected by the context: [a] -> [t a] at mc22.hs:10:9
+ Expected type: [a] -> [t a]
+ Actual type: [t a] -> [t a]
+ Relevant bindings include foo :: [t [Char]] (bound at mc22.hs:8:1)
+ In the expression: take 5
+ In a stmt of a monad comprehension: then group using take 5
diff --git a/testsuite/tests/typecheck/should_fail/tcfail034.stderr b/testsuite/tests/typecheck/should_fail/tcfail034.stderr
index 9107051d8c..d2abc05944 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail034.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail034.stderr
@@ -1,12 +1,12 @@
-
-tcfail034.hs:17:13:
- Could not deduce (Integral a) arising from a use of ‘mod’
- from the context (Num a, Eq a)
- bound by the type signature for test :: (Num a, Eq a) => a -> Bool
- at tcfail034.hs:16:7-32
- Possible fix:
- add (Integral a) to the context of
- the type signature for test :: (Num a, Eq a) => a -> Bool
- In the first argument of ‘(==)’, namely ‘(x `mod` 3)’
- In the expression: (x `mod` 3) == 0
- In an equation for ‘test’: test x = (x `mod` 3) == 0
+
+tcfail034.hs:17:13:
+ Could not deduce (Integral a) arising from a use of ‘mod’
+ from the context (Num a, Eq a)
+ bound by the type signature for: test :: (Num a, Eq a) => a -> Bool
+ at tcfail034.hs:16:7-32
+ Possible fix:
+ add (Integral a) to the context of
+ the type signature for: test :: (Num a, Eq a) => a -> Bool
+ In the first argument of ‘(==)’, namely ‘(x `mod` 3)’
+ In the expression: (x `mod` 3) == 0
+ In an equation for ‘test’: test x = (x `mod` 3) == 0
diff --git a/testsuite/tests/typecheck/should_fail/tcfail065.stderr b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
index f912a68cdd..02338415d1 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail065.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail065.stderr
@@ -1,13 +1,13 @@
-
-tcfail065.hs:29:20:
- Couldn't match expected type ‘x’ with actual type ‘x1’
- ‘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:10
- Relevant bindings include
- x :: x1 (bound at tcfail065.hs:29:8)
- setX :: x1 -> X x -> X x (bound at tcfail065.hs:29:3)
- In the first argument of ‘X’, namely ‘x’
- In the expression: X x
+
+tcfail065.hs:29:20:
+ Couldn't match expected type ‘x’ with actual type ‘x1’
+ ‘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:10
+ Relevant bindings include
+ x :: x1 (bound at tcfail065.hs:29:8)
+ setX :: x1 -> X x -> X x (bound at tcfail065.hs:29:3)
+ In the first argument of ‘X’, namely ‘x’
+ In the expression: X x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail067.stderr b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
index fb6d6707fb..bdf479c5c8 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail067.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
@@ -1,76 +1,76 @@
-
-tcfail067.hs:1:14: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail067.hs:12:16:
- No instance for (Ord a) arising from a use of ‘SubRange’
- Possible fix:
- add (Ord a) to the context of
- the type signature for subRangeValue :: SubRange a -> a
- In the pattern: SubRange (lower, upper) value
- In an equation for ‘subRangeValue’:
- subRangeValue (SubRange (lower, upper) value) = value
-
-tcfail067.hs:15:11:
- No instance for (Ord a) arising from a use of ‘SubRange’
- Possible fix:
- add (Ord a) to the context of
- the type signature for subRange :: SubRange a -> (a, a)
- In the pattern: SubRange r value
- In an equation for ‘subRange’: subRange (SubRange r value) = r
-
-tcfail067.hs:46:12:
- Could not deduce (Ord a) arising from a use of ‘SubRange’
- from the context (Show a)
- bound by the type signature for
- showRange :: Show a => SubRange a -> String
- at tcfail067.hs:45:14-43
- Possible fix:
- add (Ord a) to the context of
- the type signature for showRange :: Show a => SubRange a -> String
- In the pattern: SubRange (lower, upper) value
- In an equation for ‘showRange’:
- showRange (SubRange (lower, upper) value)
- = show value ++ " :" ++ show lower ++ ".." ++ show upper
-
-tcfail067.hs:61:12:
- Could not deduce (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) 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)’
-
-tcfail067.hs:65:19:
- Could not deduce (Ord a) arising from a use of ‘SubRange’
- from the context (Num a)
- bound by the instance declaration at tcfail067.hs:60:10-34
- Possible fix:
- add (Ord a) to the context of the instance declaration
- In the expression:
- SubRange (fromInteger a, fromInteger a) (fromInteger a)
- In an equation for ‘fromInteger’:
- fromInteger a
- = SubRange (fromInteger a, fromInteger a) (fromInteger a)
- In the instance declaration for ‘Num (SubRange a)’
-
-tcfail067.hs:74:5:
- Could not deduce (Ord a) arising from a use of ‘SubRange’
- from the context (Num a)
- bound by the type signature for
- numSubRangeBinOp :: Num a =>
- (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
- at tcfail067.hs:(71,21)-(72,58)
- Possible fix:
- add (Ord a) to the context of
- the type signature for
- numSubRangeBinOp :: Num a =>
- (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
- In the expression: SubRange (result, result) result
- In an equation for ‘numSubRangeBinOp’:
- numSubRangeBinOp op a b
- = SubRange (result, result) result
- where
- result = (subRangeValue a) `op` (subRangeValue b)
+
+tcfail067.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail067.hs:12:16:
+ No instance for (Ord a) arising from a use of ‘SubRange’
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for: subRangeValue :: SubRange a -> a
+ In the pattern: SubRange (lower, upper) value
+ In an equation for ‘subRangeValue’:
+ subRangeValue (SubRange (lower, upper) value) = value
+
+tcfail067.hs:15:11:
+ No instance for (Ord a) arising from a use of ‘SubRange’
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for: subRange :: SubRange a -> (a, a)
+ In the pattern: SubRange r value
+ In an equation for ‘subRange’: subRange (SubRange r value) = r
+
+tcfail067.hs:46:12:
+ Could not deduce (Ord a) arising from a use of ‘SubRange’
+ from the context (Show a)
+ bound by the type signature for:
+ showRange :: Show a => SubRange a -> String
+ at tcfail067.hs:45:14-43
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for: showRange :: Show a => SubRange a -> String
+ In the pattern: SubRange (lower, upper) value
+ In an equation for ‘showRange’:
+ showRange (SubRange (lower, upper) value)
+ = show value ++ " :" ++ show lower ++ ".." ++ show upper
+
+tcfail067.hs:61:12:
+ Could not deduce (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) 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)’
+
+tcfail067.hs:65:19:
+ Could not deduce (Ord a) arising from a use of ‘SubRange’
+ from the context (Num a)
+ bound by the instance declaration at tcfail067.hs:60:10-34
+ Possible fix:
+ add (Ord a) to the context of the instance declaration
+ In the expression:
+ SubRange (fromInteger a, fromInteger a) (fromInteger a)
+ In an equation for ‘fromInteger’:
+ fromInteger a
+ = SubRange (fromInteger a, fromInteger a) (fromInteger a)
+ In the instance declaration for ‘Num (SubRange a)’
+
+tcfail067.hs:74:5:
+ Could not deduce (Ord a) arising from a use of ‘SubRange’
+ from the context (Num a)
+ bound by the type signature for:
+ numSubRangeBinOp :: Num a =>
+ (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
+ at tcfail067.hs:(71,21)-(72,58)
+ Possible fix:
+ add (Ord a) to the context of
+ the type signature for:
+ numSubRangeBinOp :: Num a =>
+ (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a
+ In the expression: SubRange (result, result) result
+ In an equation for ‘numSubRangeBinOp’:
+ numSubRangeBinOp op a b
+ = SubRange (result, result) result
+ where
+ result = (subRangeValue a) `op` (subRangeValue b)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail068.stderr b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
index 233c92e6ae..a25e57524c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail068.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail068.stderr
@@ -1,96 +1,96 @@
-
-tcfail068.hs:14:9:
- Couldn't match type ‘s1’ with ‘s’
- ‘s1’ is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (IndTree s a)
- at tcfail068.hs:13:9
- ‘s’ is a rigid type variable bound by
- the type signature for
- itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
- at tcfail068.hs:11:10
- Expected type: GHC.ST.ST s1 (IndTree s a)
- Actual type: GHC.ST.ST s1 (STArray s1 (Int, Int) a)
- Relevant bindings include
- itgen :: (Int, Int) -> a -> IndTree s a
- (bound at tcfail068.hs:12:1)
- In the first argument of ‘runST’, namely
- ‘(newSTArray ((1, 1), n) x)’
- In the expression: runST (newSTArray ((1, 1), n) x)
-
-tcfail068.hs:19:21:
- Couldn't match type ‘s’ with ‘s1’
- ‘s’ is a rigid type variable bound by
- the type signature for
- itiap :: Constructed a =>
- (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:16:10
- ‘s1’ is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (IndTree s a)
- at tcfail068.hs:18:9
- Expected type: STArray s1 (Int, Int) a
- Actual type: IndTree s a
- Relevant bindings include
- arr :: IndTree s a (bound at tcfail068.hs:17:11)
- itiap :: (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
- (bound at tcfail068.hs:17:1)
- In the first argument of ‘readSTArray’, namely ‘arr’
- In the first argument of ‘(>>=)’, namely ‘readSTArray arr i’
-
-tcfail068.hs:24:36:
- Couldn't match type ‘s’ with ‘s1’
- ‘s’ is a rigid type variable bound by
- the type signature for
- itrap :: Constructed a =>
- ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
- at tcfail068.hs:23:10
- ‘s1’ is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (IndTree s a)
- at tcfail068.hs:24:29
- Expected type: GHC.ST.ST s1 (IndTree s a)
- Actual type: GHC.ST.ST s (IndTree s a)
- Relevant bindings include
- itrap' :: Int -> Int -> GHC.ST.ST s (IndTree s a)
- (bound at tcfail068.hs:26:9)
- itrapsnd :: Int -> Int -> GHC.ST.ST s (IndTree s a)
- (bound at tcfail068.hs:29:9)
- arr :: IndTree s a (bound at tcfail068.hs:24:23)
- itrap :: ((Int, Int), (Int, Int))
- -> (a -> a) -> IndTree s a -> IndTree s a
- (bound at tcfail068.hs:24:1)
- In the first argument of ‘runST’, namely ‘(itrap' i k)’
- In the expression: runST (itrap' i k)
-
-tcfail068.hs:36:46:
- Couldn't match type ‘s’ with ‘s1’
- ‘s’ is a rigid type variable bound by
- the type signature for
- itrapstate :: Constructed b =>
- ((Int, Int), (Int, Int))
- -> (a -> b -> (a, b))
- -> ((Int, Int) -> c -> a)
- -> (a -> c)
- -> c
- -> IndTree s b
- -> (c, IndTree s b)
- at tcfail068.hs:34:15
- ‘s1’ is a rigid type variable bound by
- a type expected by the context: GHC.ST.ST s1 (c, IndTree s b)
- at tcfail068.hs:36:40
- Expected type: GHC.ST.ST s1 (c, IndTree s b)
- Actual type: GHC.ST.ST s (c, IndTree s b)
- Relevant bindings include
- itrapstate' :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
- (bound at tcfail068.hs:38:9)
- itrapstatesnd :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
- (bound at tcfail068.hs:41:9)
- arr :: IndTree s b (bound at tcfail068.hs:36:34)
- itrapstate :: ((Int, Int), (Int, Int))
- -> (a -> b -> (a, b))
- -> ((Int, Int) -> c -> a)
- -> (a -> c)
- -> c
- -> IndTree s b
- -> (c, IndTree s b)
- (bound at tcfail068.hs:36:1)
- In the first argument of ‘runST’, namely ‘(itrapstate' i k s)’
- In the expression: runST (itrapstate' i k s)
+
+tcfail068.hs:14:9:
+ Couldn't match type ‘s1’ with ‘s’
+ ‘s1’ is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (IndTree s a)
+ at tcfail068.hs:13:9
+ ‘s’ is a rigid type variable bound by
+ the type signature for:
+ itgen :: Constructed a => (Int, Int) -> a -> IndTree s a
+ at tcfail068.hs:11:10
+ Expected type: GHC.ST.ST s1 (IndTree s a)
+ Actual type: GHC.ST.ST s1 (STArray s1 (Int, Int) a)
+ Relevant bindings include
+ itgen :: (Int, Int) -> a -> IndTree s a
+ (bound at tcfail068.hs:12:1)
+ In the first argument of ‘runST’, namely
+ ‘(newSTArray ((1, 1), n) x)’
+ In the expression: runST (newSTArray ((1, 1), n) x)
+
+tcfail068.hs:19:21:
+ Couldn't match type ‘s’ with ‘s1’
+ ‘s’ is a rigid type variable bound by
+ the type signature for:
+ itiap :: Constructed a =>
+ (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
+ at tcfail068.hs:16:10
+ ‘s1’ is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (IndTree s a)
+ at tcfail068.hs:18:9
+ Expected type: STArray s1 (Int, Int) a
+ Actual type: IndTree s a
+ Relevant bindings include
+ arr :: IndTree s a (bound at tcfail068.hs:17:11)
+ itiap :: (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a
+ (bound at tcfail068.hs:17:1)
+ In the first argument of ‘readSTArray’, namely ‘arr’
+ In the first argument of ‘(>>=)’, namely ‘readSTArray arr i’
+
+tcfail068.hs:24:36:
+ Couldn't match type ‘s’ with ‘s1’
+ ‘s’ is a rigid type variable bound by
+ the type signature for:
+ itrap :: Constructed a =>
+ ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a
+ at tcfail068.hs:23:10
+ ‘s1’ is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (IndTree s a)
+ at tcfail068.hs:24:29
+ Expected type: GHC.ST.ST s1 (IndTree s a)
+ Actual type: GHC.ST.ST s (IndTree s a)
+ Relevant bindings include
+ itrap' :: Int -> Int -> GHC.ST.ST s (IndTree s a)
+ (bound at tcfail068.hs:26:9)
+ itrapsnd :: Int -> Int -> GHC.ST.ST s (IndTree s a)
+ (bound at tcfail068.hs:29:9)
+ arr :: IndTree s a (bound at tcfail068.hs:24:23)
+ itrap :: ((Int, Int), (Int, Int))
+ -> (a -> a) -> IndTree s a -> IndTree s a
+ (bound at tcfail068.hs:24:1)
+ In the first argument of ‘runST’, namely ‘(itrap' i k)’
+ In the expression: runST (itrap' i k)
+
+tcfail068.hs:36:46:
+ Couldn't match type ‘s’ with ‘s1’
+ ‘s’ is a rigid type variable bound by
+ the type signature for:
+ itrapstate :: Constructed b =>
+ ((Int, Int), (Int, Int))
+ -> (a -> b -> (a, b))
+ -> ((Int, Int) -> c -> a)
+ -> (a -> c)
+ -> c
+ -> IndTree s b
+ -> (c, IndTree s b)
+ at tcfail068.hs:34:15
+ ‘s1’ is a rigid type variable bound by
+ a type expected by the context: GHC.ST.ST s1 (c, IndTree s b)
+ at tcfail068.hs:36:40
+ Expected type: GHC.ST.ST s1 (c, IndTree s b)
+ Actual type: GHC.ST.ST s (c, IndTree s b)
+ Relevant bindings include
+ itrapstate' :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
+ (bound at tcfail068.hs:38:9)
+ itrapstatesnd :: Int -> Int -> c -> GHC.ST.ST s (c, IndTree s b)
+ (bound at tcfail068.hs:41:9)
+ arr :: IndTree s b (bound at tcfail068.hs:36:34)
+ itrapstate :: ((Int, Int), (Int, Int))
+ -> (a -> b -> (a, b))
+ -> ((Int, Int) -> c -> a)
+ -> (a -> c)
+ -> c
+ -> IndTree s b
+ -> (c, IndTree s b)
+ (bound at tcfail068.hs:36:1)
+ 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 aeb0e9ae71..9d88d70c80 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr
@@ -2,8 +2,8 @@
tcfail072.hs:23:13:
Could not deduce (Ord p0) 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
+ bound by the type signature for:
+ g :: (Ord p, Ord q) => AB p q -> Bool
at tcfail072.hs:22:6-38
The type variable ‘p0’ is ambiguous
Note: there are several potential instances:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail097.stderr b/testsuite/tests/typecheck/should_fail/tcfail097.stderr
index 821972402b..b5be488b40 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail097.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail097.stderr
@@ -1,11 +1,11 @@
-
-tcfail097.hs:5:6:
- Could not deduce (Eq a0)
- from the context (Eq a)
- bound by the type signature for f :: Eq a => Int -> Int
- at tcfail097.hs:5:6-23
- The type variable ‘a0’ is ambiguous
- In the ambiguity check for the type signature for ‘f’:
- f :: forall a. Eq a => Int -> Int
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘f’: f :: Eq a => Int -> Int
+
+tcfail097.hs:5:6:
+ Could not deduce (Eq a0)
+ from the context (Eq a)
+ bound by the type signature for: f :: Eq a => Int -> Int
+ at tcfail097.hs:5:6-23
+ The type variable ‘a0’ is ambiguous
+ In the ambiguity check for the type signature for ‘f’:
+ f :: forall a. Eq a => Int -> Int
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘f’: f :: Eq a => Int -> Int
diff --git a/testsuite/tests/typecheck/should_fail/tcfail099.stderr b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
index 7b1f5bc0e0..cb3008cf7b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail099.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail099.stderr
@@ -1,15 +1,14 @@
-
-tcfail099.hs:9:20:
- Couldn't match expected type ‘a’ with actual type ‘t’
- because type variable ‘a’ would escape its scope
- This (rigid, skolem) type variable is bound by
- a pattern with constructor
- C :: forall a. (a -> Int) -> DS,
- in an equation for ‘call’
- at tcfail099.hs:9:7-9
- Relevant bindings include
- arg :: t (bound at tcfail099.hs:9:12)
- f :: a -> Int (bound at tcfail099.hs:9:9)
- call :: DS -> t -> Int (bound at tcfail099.hs:9:1)
- In the first argument of ‘f’, namely ‘arg’
- In the expression: f arg
+
+tcfail099.hs:9:20:
+ Couldn't match expected type ‘a’ with actual type ‘t’
+ because type variable ‘a’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ a pattern with constructor: C :: forall a. (a -> Int) -> DS,
+ in an equation for ‘call’
+ at tcfail099.hs:9:7-9
+ Relevant bindings include
+ arg :: t (bound at tcfail099.hs:9:12)
+ f :: a -> Int (bound at tcfail099.hs:9:9)
+ call :: DS -> t -> Int (bound at tcfail099.hs:9:1)
+ In the first argument of ‘f’, namely ‘arg’
+ In the expression: f arg
diff --git a/testsuite/tests/typecheck/should_fail/tcfail102.stderr b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
index 01a8bba99a..f32dead217 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail102.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
@@ -1,13 +1,13 @@
-
-tcfail102.hs:1:14: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail102.hs:9:15:
- Could not deduce (Integral (Ratio a)) arising from a use of ‘p’
- from the context (Integral a)
- bound by the type signature for
- f :: Integral a => P (Ratio a) -> P (Ratio a)
- at tcfail102.hs:8:6-45
- In the ‘p’ field of a record
- In the expression: x {p = p x}
- In an equation for ‘f’: f x = x {p = p x}
+
+tcfail102.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail102.hs:9:15:
+ Could not deduce (Integral (Ratio a)) arising from a use of ‘p’
+ from the context (Integral a)
+ bound by the type signature for:
+ f :: Integral a => P (Ratio a) -> P (Ratio a)
+ at tcfail102.hs:8:6-45
+ In the ‘p’ field of a record
+ In the expression: x {p = p x}
+ In an equation for ‘f’: f x = x {p = p x}
diff --git a/testsuite/tests/typecheck/should_fail/tcfail103.stderr b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
index 1d71a6aa9a..1b57893608 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail103.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail103.stderr
@@ -1,15 +1,15 @@
-
-tcfail103.hs:15:23:
- Couldn't match type ‘t’ with ‘s’
- ‘t’ is a rigid type variable bound by
- the type signature for f :: ST t Int at tcfail103.hs:10:5
- ‘s’ is a rigid type variable bound by
- the type signature for g :: ST s Int at tcfail103.hs:13:14
- Expected type: STRef s Int
- Actual type: STRef t Int
- Relevant bindings include
- g :: ST s Int (bound at tcfail103.hs:15:9)
- v :: STRef t Int (bound at tcfail103.hs:12:5)
- f :: ST t Int (bound at tcfail103.hs:11:1)
- In the first argument of ‘readSTRef’, namely ‘v’
- In the expression: readSTRef v
+
+tcfail103.hs:15:23:
+ Couldn't match type ‘t’ with ‘s’
+ ‘t’ is a rigid type variable bound by
+ the type signature for: f :: ST t Int at tcfail103.hs:10:5
+ ‘s’ is a rigid type variable bound by
+ the type signature for: g :: ST s Int at tcfail103.hs:13:14
+ Expected type: STRef s Int
+ Actual type: STRef t Int
+ Relevant bindings include
+ g :: ST s Int (bound at tcfail103.hs:15:9)
+ v :: STRef t Int (bound at tcfail103.hs:12:5)
+ f :: ST t Int (bound at tcfail103.hs:11:1)
+ In the first argument of ‘readSTRef’, namely ‘v’
+ In the expression: readSTRef v
diff --git a/testsuite/tests/typecheck/should_fail/tcfail125.stderr b/testsuite/tests/typecheck/should_fail/tcfail125.stderr
index b3e0720f79..5d31a29080 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail125.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail125.stderr
@@ -1,11 +1,11 @@
-
-tcfail125.hs:1:14: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail125.hs:11:4:
- No instance for (Show a) arising from a use of ‘LiftObs’
- Possible fix:
- add (Show a) to the context of
- the type signature for f :: Obs a -> String
- In the pattern: LiftObs _ _
- In an equation for ‘f’: f (LiftObs _ _) = "yes"
+
+tcfail125.hs:1:14: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail125.hs:11:4:
+ No instance for (Show a) arising from a use of ‘LiftObs’
+ Possible fix:
+ add (Show a) to the context of
+ the type signature for: f :: Obs a -> String
+ In the pattern: LiftObs _ _
+ In an equation for ‘f’: f (LiftObs _ _) = "yes"
diff --git a/testsuite/tests/typecheck/should_fail/tcfail131.stderr b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
index f49a4b3975..cb2bd64e5b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail131.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail131.stderr
@@ -1,10 +1,10 @@
-
-tcfail131.hs:7:9:
- Couldn't match expected type ‘b’ with actual type ‘Integer’
- ‘b’ is a rigid type variable bound by
- the type signature for g :: Num b => b -> b at tcfail131.hs:6:8
- Relevant bindings include
- x :: b (bound at tcfail131.hs:7:5)
- g :: b -> b (bound at tcfail131.hs:7:3)
- In the expression: f x x
- In an equation for ‘g’: g x = f x x
+
+tcfail131.hs:7:9:
+ Couldn't match expected type ‘b’ with actual type ‘Integer’
+ ‘b’ is a rigid type variable bound by
+ the type signature for: g :: Num b => b -> b at tcfail131.hs:6:8
+ Relevant bindings include
+ x :: b (bound at tcfail131.hs:7:5)
+ g :: b -> b (bound at tcfail131.hs:7:3)
+ In the expression: f x x
+ In an equation for ‘g’: g x = f x x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail142.stderr b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
index fecb2f370f..3cde64a4bc 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail142.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail142.stderr
@@ -1,11 +1,11 @@
-
-tcfail142.hs:18:8:
- Could not deduce (Bar a0 r)
- from the context (Bar a r)
- bound by the type signature for bar :: Bar a r => r -> ()
- at tcfail142.hs:18:8-25
- The type variable ‘a0’ is ambiguous
- In the ambiguity check for the type signature for ‘bar’:
- bar :: forall r a. Bar a r => r -> ()
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘bar’: bar :: Bar a r => r -> ()
+
+tcfail142.hs:18:8:
+ Could not deduce (Bar a0 r)
+ from the context (Bar a r)
+ bound by the type signature for: bar :: Bar a r => r -> ()
+ at tcfail142.hs:18:8-25
+ The type variable ‘a0’ is ambiguous
+ In the ambiguity check for the type signature for ‘bar’:
+ bar :: forall r a. Bar a r => r -> ()
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ In the type signature for ‘bar’: bar :: Bar a r => r -> ()
diff --git a/testsuite/tests/typecheck/should_fail/tcfail153.stderr b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
index 80efb9221c..aafe8a269a 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail153.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail153.stderr
@@ -1,16 +1,16 @@
-
-tcfail153.hs:6:7:
- Couldn't match type ‘a’ with ‘Bool’
- ‘a’ is a rigid type variable bound by
- the type signature for f :: a -> [a] at tcfail153.hs:5:6
- Expected type: [a]
- Actual type: [Bool]
- Relevant bindings include
- x :: a (bound at tcfail153.hs:6:3)
- f :: a -> [a] (bound at tcfail153.hs:6:1)
- In the expression: g x
- In an equation for ‘f’:
- f x
- = g x
- where
- g y = if y then [] else [...]
+
+tcfail153.hs:6:7:
+ Couldn't match type ‘a’ with ‘Bool’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: f :: a -> [a] at tcfail153.hs:5:6
+ Expected type: [a]
+ Actual type: [Bool]
+ Relevant bindings include
+ x :: a (bound at tcfail153.hs:6:3)
+ f :: a -> [a] (bound at tcfail153.hs:6:1)
+ In the expression: g x
+ In an equation for ‘f’:
+ f x
+ = g x
+ where
+ g y = if y then [] else [...]
diff --git a/testsuite/tests/typecheck/should_fail/tcfail167.stderr b/testsuite/tests/typecheck/should_fail/tcfail167.stderr
index e20e1cfe7c..e274c5ddc7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail167.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail167.stderr
@@ -1,9 +1,8 @@
-
-tcfail167.hs:14:14:
- Couldn't match type ‘Char’ with ‘Float’
- Inaccessible code in
- a pattern with constructor
- C2 :: T Float,
- in an equation for ‘inaccessible’
- In the pattern: C2
- In an equation for ‘inaccessible’: inaccessible C2 = ' '
+
+tcfail167.hs:14:14:
+ Couldn't match type ‘Char’ with ‘Float’
+ Inaccessible code in
+ a pattern with constructor: C2 :: T Float,
+ in an equation for ‘inaccessible’
+ In the pattern: C2
+ In an equation for ‘inaccessible’: inaccessible C2 = ' '
diff --git a/testsuite/tests/typecheck/should_fail/tcfail171.stderr b/testsuite/tests/typecheck/should_fail/tcfail171.stderr
index d29f91ef05..9c7a786026 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail171.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail171.stderr
@@ -1,8 +1,8 @@
-
-tcfail171.hs:9:10:
- No instance for (PrintfType b) arising from a use of ‘printf’
- Possible fix:
- add (PrintfType b) to the context of
- the type signature for phex :: a -> b
- In the expression: printf "0x%x" x
- In an equation for ‘phex’: phex x = printf "0x%x" x
+
+tcfail171.hs:9:10:
+ No instance for (PrintfType b) arising from a use of ‘printf’
+ Possible fix:
+ add (PrintfType b) to the context of
+ the type signature for: phex :: a -> b
+ In the expression: printf "0x%x" x
+ In an equation for ‘phex’: phex x = printf "0x%x" x
diff --git a/testsuite/tests/typecheck/should_fail/tcfail174.stderr b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
index 577c36e94b..42aa7a91fa 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail174.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail174.stderr
@@ -1,32 +1,32 @@
-
-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
-
-tcfail174.hs:13:14:
- Couldn't match type ‘a’ with ‘a1’
- because type variable ‘a1’ would escape its scope
- This (rigid, skolem) type variable is bound by
- the type forall a2. a2 -> a2
- at tcfail174.hs:13:1-14
- Expected type: Capture (forall x. x -> a)
- Actual type: Capture (forall a. a -> a)
- Relevant bindings include
- h1 :: Capture a (bound at tcfail174.hs:13:1)
- In the first argument of ‘Capture’, namely ‘g’
- In the expression: Capture g
-
-tcfail174.hs:16:14:
- Couldn't match type ‘a’ with ‘b’
- ‘a’ is a rigid type variable bound by
- the type forall a1. a1 -> a1 at tcfail174.hs:1:1
- ‘b’ is a rigid type variable bound by
- the type signature for h2 :: Capture b at tcfail174.hs:15:7
- Expected type: Capture (forall x. x -> b)
- Actual type: Capture (forall a. a -> a)
- Relevant bindings include
- h2 :: Capture b (bound at tcfail174.hs:16:1)
- In the first argument of ‘Capture’, namely ‘g’
- In the expression: Capture g
+
+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
+
+tcfail174.hs:13:14:
+ Couldn't match type ‘a’ with ‘a1’
+ because type variable ‘a1’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type forall a2. a2 -> a2
+ at tcfail174.hs:13:1-14
+ Expected type: Capture (forall x. x -> a)
+ Actual type: Capture (forall a. a -> a)
+ Relevant bindings include
+ h1 :: Capture a (bound at tcfail174.hs:13:1)
+ In the first argument of ‘Capture’, namely ‘g’
+ In the expression: Capture g
+
+tcfail174.hs:16:14:
+ Couldn't match type ‘a’ with ‘b’
+ ‘a’ is a rigid type variable bound by
+ the type forall a1. a1 -> a1 at tcfail174.hs:1:1
+ ‘b’ is a rigid type variable bound by
+ the type signature for: h2 :: Capture b at tcfail174.hs:15:7
+ Expected type: Capture (forall x. x -> b)
+ Actual type: Capture (forall a. a -> a)
+ Relevant bindings include
+ h2 :: Capture b (bound at tcfail174.hs:16:1)
+ In the first argument of ‘Capture’, namely ‘g’
+ In the expression: Capture g
diff --git a/testsuite/tests/typecheck/should_fail/tcfail175.stderr b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
index 623aab2706..8689fd1a6c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail175.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail175.stderr
@@ -1,10 +1,10 @@
-
-tcfail175.hs:11:1:
- Couldn't match expected type ‘String -> String -> String’
- with actual type ‘a’
- ‘a’ is a rigid type variable bound by
- the type signature for evalRHS :: Int -> a at tcfail175.hs:10:12
- Relevant bindings include
- evalRHS :: Int -> a (bound at tcfail175.hs:11:1)
- The equation(s) for ‘evalRHS’ have three arguments,
- but its type ‘Int -> a’ has only one
+
+tcfail175.hs:11:1:
+ Couldn't match expected type ‘String -> String -> String’
+ with actual type ‘a’
+ ‘a’ is a rigid type variable bound by
+ the type signature for: evalRHS :: Int -> a at tcfail175.hs:10:12
+ Relevant bindings include
+ evalRHS :: Int -> a (bound at tcfail175.hs:11:1)
+ The equation(s) for ‘evalRHS’ have three arguments,
+ but its type ‘Int -> a’ has only one
diff --git a/testsuite/tests/typecheck/should_fail/tcfail179.stderr b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
index 0fdaeade03..51c66e138b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail179.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail179.stderr
@@ -1,17 +1,17 @@
-
-tcfail179.hs:14:39:
- Couldn't match expected type ‘s’ with actual type ‘x’
- ‘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:12:8
- Relevant bindings include
- x :: x (bound at tcfail179.hs:14:26)
- g :: s -> (x -> s) -> (x, s, Int) (bound at tcfail179.hs:14:16)
- ts :: T s (bound at tcfail179.hs:13:5)
- run :: T s -> Int (bound at tcfail179.hs:13:1)
- In the first argument of ‘g’, namely ‘x’
- In the expression: g x id
+
+tcfail179.hs:14:39:
+ Couldn't match expected type ‘s’ with actual type ‘x’
+ ‘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:12:8
+ Relevant bindings include
+ x :: x (bound at tcfail179.hs:14:26)
+ g :: s -> (x -> s) -> (x, s, Int) (bound at tcfail179.hs:14:16)
+ ts :: T s (bound at tcfail179.hs:13:5)
+ run :: T s -> Int (bound at tcfail179.hs:13:1)
+ In the first argument of ‘g’, namely ‘x’
+ In the expression: g x id
diff --git a/testsuite/tests/typecheck/should_fail/tcfail201.stderr b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
index 1270315a19..1414ceabb3 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail201.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail201.stderr
@@ -1,20 +1,20 @@
-
-tcfail201.hs:18:28:
- Couldn't match expected type ‘a’ with actual type ‘HsDoc id1’
- ‘a’ is a rigid type variable bound by
- the type signature for
- gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
- -> (forall g. g -> c g) -> a -> c a
- at tcfail201.hs:15:12
- Relevant bindings include
- hsDoc :: a (bound at tcfail201.hs:16:13)
- gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
- -> (forall g. g -> c g) -> a -> c a
- (bound at tcfail201.hs:16:1)
- In the 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 id1’
+ ‘a’ is a rigid type variable bound by
+ the type signature for:
+ gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
+ -> (forall g. g -> c g) -> a -> c a
+ at tcfail201.hs:15:12
+ Relevant bindings include
+ hsDoc :: a (bound at tcfail201.hs:16:13)
+ gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b)
+ -> (forall g. g -> c g) -> a -> c a
+ (bound at tcfail201.hs:16:1)
+ In the 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.stderr b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
index 3eec7088cd..bd3d90df57 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail206.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
@@ -16,7 +16,7 @@ tcfail206.hs:8:5:
tcfail206.hs:11:5:
Couldn't match type ‘a’ with ‘Bool’
‘a’ is a rigid type variable bound by
- the type signature for c :: a -> (a, Bool) at tcfail206.hs:10:6
+ the type signature for: c :: a -> (a, Bool) at tcfail206.hs:10:6
Expected type: a -> (a, Bool)
Actual type: a -> (a, a)
Relevant bindings include
@@ -42,7 +42,7 @@ tcfail206.hs:17:5:
tcfail206.hs:20:5:
Couldn't match type ‘a’ with ‘Bool’
‘a’ is a rigid type variable bound by
- the type signature for f :: a -> (# a, Bool #) at tcfail206.hs:19:6
+ the type signature for: f :: a -> (# a, Bool #) at tcfail206.hs:19:6
Expected type: a -> (# a, Bool #)
Actual type: a -> (# a, a #)
Relevant bindings include
diff --git a/testsuite/tests/typecheck/should_fail/tcfail208.stderr b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
index c83c63be3f..ec3f4c668b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail208.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail208.stderr
@@ -1,9 +1,9 @@
-
-tcfail208.hs:4:19:
- Could not deduce (Eq (m a)) arising from a use of ‘==’
- from the context (Monad m, Eq a)
- bound by the type signature for
- f :: (Monad m, Eq a) => a -> m a -> Bool
- at tcfail208.hs:3:6-40
- In the expression: (return x == y)
- In an equation for ‘f’: f x y = (return x == y)
+
+tcfail208.hs:4:19:
+ Could not deduce (Eq (m a)) arising from a use of ‘==’
+ from the context (Monad m, Eq a)
+ bound by the type signature for:
+ f :: (Monad m, Eq a) => a -> m a -> Bool
+ at tcfail208.hs:3:6-40
+ In the expression: (return x == y)
+ In an equation for ‘f’: f x y = (return x == y)