diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-01-05 12:56:46 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-01-06 14:18:53 +0000 |
commit | da9b2ec3e19edb1de0e73e8f32aa0443743f072c (patch) | |
tree | e917140da7b725bce9a44d048ac6013af113d6be /testsuite/tests | |
parent | d4f460feeb263f794774bf2fc330a48bde4ea81c (diff) | |
download | haskell-da9b2ec3e19edb1de0e73e8f32aa0443743f072c.tar.gz |
Print singleton consraints without parens
The main change is in TypeRep.pprTheta, so we print
Eq a
for a singleton, but
(Eq a, Show a)
for multiple constraints.
There are lots of trivial knock-on changes to error messages
Diffstat (limited to 'testsuite/tests')
52 files changed, 482 insertions, 483 deletions
diff --git a/testsuite/tests/deriving/should_fail/T5287.stderr b/testsuite/tests/deriving/should_fail/T5287.stderr index 0c068e0574..529751c2d3 100644 --- a/testsuite/tests/deriving/should_fail/T5287.stderr +++ b/testsuite/tests/deriving/should_fail/T5287.stderr @@ -1,7 +1,7 @@ T5287.hs:6:10: Could not deduce (A a oops0) - from the context (A a oops) + from the context: A a oops bound by an instance declaration: A a oops => Read (D a) at T5287.hs:6:10-31 The type variable ‘oops0’ is ambiguous diff --git a/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr b/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr index ab7812a3f7..e0aa34656c 100644 --- a/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr +++ b/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr @@ -19,7 +19,7 @@ drvfail-functor2.hs:15:14: drvfail-functor2.hs:20:14: Can't make a derived instance of ‘Functor StupidConstraint’: - Data type ‘StupidConstraint’ must not have a class context (Eq a) + Data type ‘StupidConstraint’ must not have a class context: Eq a In the data declaration for ‘StupidConstraint’ drvfail-functor2.hs:26:14: diff --git a/testsuite/tests/gadt/gadt-escape1.stderr b/testsuite/tests/gadt/gadt-escape1.stderr index a98e2739a9..a8df3a598a 100644 --- a/testsuite/tests/gadt/gadt-escape1.stderr +++ b/testsuite/tests/gadt/gadt-escape1.stderr @@ -1,17 +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 c8b7259663..db3fb99717 100644 --- a/testsuite/tests/gadt/gadt13.stderr +++ b/testsuite/tests/gadt/gadt13.stderr @@ -1,16 +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 878abe2a14..7259672c7a 100644 --- a/testsuite/tests/gadt/gadt21.stderr +++ b/testsuite/tests/gadt/gadt21.stderr @@ -1,14 +1,14 @@ -
-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:
- TypeSet :: forall a. Type a -> Type (Set a),
- in an equation for ‘withOrdDynExpr’
- at gadt21.hs:21:35-43
- Possible fix:
- add (Ord a1) to the context of the data constructor ‘TypeSet’
- In the first argument of ‘Just’, namely ‘(f e)’
- In the expression: Just (f e)
- In an equation for ‘withOrdDynExpr’:
- withOrdDynExpr (DynExpr e@(Const (TypeSet _) _)) f = Just (f e)
+ +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: + TypeSet :: forall a. Type a -> Type (Set a), + in an equation for ‘withOrdDynExpr’ + at gadt21.hs:21:35-43 + Possible fix: + add (Ord a1) to the context of the data constructor ‘TypeSet’ + In the first argument of ‘Just’, namely ‘(f e)’ + In the expression: Just (f e) + In an equation for ‘withOrdDynExpr’: + withOrdDynExpr (DynExpr e@(Const (TypeSet _) _)) f = Just (f e) diff --git a/testsuite/tests/gadt/gadt7.stderr b/testsuite/tests/gadt/gadt7.stderr index 2721e9906e..603cf5b25f 100644 --- a/testsuite/tests/gadt/gadt7.stderr +++ b/testsuite/tests/gadt/gadt7.stderr @@ -1,19 +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/indexed-types/should_compile/Simple14.stderr b/testsuite/tests/indexed-types/should_compile/Simple14.stderr index d3531ac9c5..861013259c 100644 --- a/testsuite/tests/indexed-types/should_compile/Simple14.stderr +++ b/testsuite/tests/indexed-types/should_compile/Simple14.stderr @@ -2,7 +2,7 @@ Simple14.hs:8:8: Couldn't match type ‘z0’ with ‘z’ ‘z0’ is untouchable - inside the constraints (x ~ y) + inside the constraints: x ~ y 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 diff --git a/testsuite/tests/indexed-types/should_compile/T3208b.stderr b/testsuite/tests/indexed-types/should_compile/T3208b.stderr index b476088162..b5014d0049 100644 --- a/testsuite/tests/indexed-types/should_compile/T3208b.stderr +++ b/testsuite/tests/indexed-types/should_compile/T3208b.stderr @@ -1,7 +1,7 @@ T3208b.hs:15:10: - Could not deduce (STerm o0 ~ OTerm o0) - from the context (OTerm a ~ STerm a, OBJECT a, SUBST a) + 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 at T3208b.hs:14:9-56 @@ -10,8 +10,8 @@ T3208b.hs:15:10: In an equation for ‘fce'’: fce' f = fce (apply f) T3208b.hs:15:15: - Could not deduce (OTerm o0 ~ OTerm a) - from the context (OTerm a ~ STerm a, OBJECT a, SUBST a) + 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 at T3208b.hs:14:9-56 diff --git a/testsuite/tests/indexed-types/should_fail/T2664.stderr b/testsuite/tests/indexed-types/should_fail/T2664.stderr index 8d000cae93..43a38de87b 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/T3440.stderr b/testsuite/tests/indexed-types/should_fail/T3440.stderr index 1234d7538b..5deb1e8de4 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 1fa49053f3..0228a88edf 100644 --- a/testsuite/tests/indexed-types/should_fail/T4093a.stderr +++ b/testsuite/tests/indexed-types/should_fail/T4093a.stderr @@ -1,14 +1,14 @@ -
-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
- at T4093a.hs:7:9-34
- The type variable ‘e0’ is ambiguous
- Expected type: Foo e
- Actual type: Foo e0
- In the ambiguity check for the type signature for ‘hang’:
- hang :: forall e. (Foo e ~ Maybe e) => Foo e
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the type signature for ‘hang’:
- hang :: (Foo e ~ Maybe e) => Foo e
+ +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 + at T4093a.hs:7:9-34 + The type variable ‘e0’ is ambiguous + Expected type: Foo e + Actual type: Foo e0 + In the ambiguity check for the type signature for ‘hang’: + hang :: forall e. (Foo e ~ Maybe e) => Foo e + To defer the ambiguity check to use sites, enable AllowAmbiguousTypes + In the type signature for ‘hang’: + hang :: (Foo e ~ Maybe e) => Foo e diff --git a/testsuite/tests/indexed-types/should_fail/T4093b.stderr b/testsuite/tests/indexed-types/should_fail/T4093b.stderr index 9d749d19c6..802757d514 100644 --- a/testsuite/tests/indexed-types/should_fail/T4093b.stderr +++ b/testsuite/tests/indexed-types/should_fail/T4093b.stderr @@ -1,8 +1,8 @@ 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) + 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) => diff --git a/testsuite/tests/indexed-types/should_fail/T8155.stderr b/testsuite/tests/indexed-types/should_fail/T8155.stderr index fb0ceb457b..2d68242b1f 100644 --- a/testsuite/tests/indexed-types/should_fail/T8155.stderr +++ b/testsuite/tests/indexed-types/should_fail/T8155.stderr @@ -2,7 +2,7 @@ T8155.hs:26:14: Could not deduce (Integral (BoundsOf (a -> a))) arising from a use of ‘buildV’ - from the context (Num a) + from the context: Num a bound by the instance declaration at T8155.hs:25:10-32 In the expression: buildV In an equation for ‘build'’: build' = buildV diff --git a/testsuite/tests/module/mod47.stderr b/testsuite/tests/module/mod47.stderr index 98bfdab685..6df1a6b63b 100644 --- a/testsuite/tests/module/mod47.stderr +++ b/testsuite/tests/module/mod47.stderr @@ -2,7 +2,7 @@ mod47.hs:6:10: Could not deduce (Num a) arising from the superclasses of an instance declaration - from the context (Eq a, Enum a) + from the context: (Eq a, Enum a) bound by the instance declaration at mod47.hs:6:10-34 Possible fix: add (Num a) to the context of the instance declaration diff --git a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr index af573c5ffa..8e0fa1742e 100644 --- a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr +++ b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr @@ -7,7 +7,6 @@ Dependent modules: [] Dependent packages: [base-4.8.0.0, ghc-prim-0.3.1.0, integer-gmp-1.0.0.0] - WarningWildcardInstantiations.hs:5:14: Warning: Found hole ‘_a’ with type: w_a Where: ‘w_a’ is a rigid type variable bound by @@ -16,7 +15,7 @@ WarningWildcardInstantiations.hs:5:14: Warning: In the type signature for ‘foo’: (Show _a, _) => _a -> _ WarningWildcardInstantiations.hs:5:18: Warning: - Found hole ‘_’ with inferred constraints: (Enum w_a) + Found hole ‘_’ with inferred constraints: Enum w_a In the type signature for ‘foo’: (Show _a, _) => _a -> _ WarningWildcardInstantiations.hs:5:30: Warning: @@ -40,7 +39,7 @@ WarningWildcardInstantiations.hs:8:13: Warning: at WarningWildcardInstantiations.hs:9:1 In the type signature for ‘bar’: _ -> _ -> _ - WarningWildcardInstantiations.hs:8:18: Warning: +WarningWildcardInstantiations.hs:8:18: Warning: Found hole ‘_’ with type: w_1 Where: ‘w_1’ is a rigid type variable bound by the inferred type of bar :: w_ -> (w_ -> w_1) -> w_1 diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr index c1007c2a8f..64839127c7 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr @@ -1,5 +1,5 @@ ExtraConstraintsWildcardNotEnabled.hs:4:10: - Found hole ‘_’ with inferred constraints: (Show a) + Found hole ‘_’ with inferred constraints: Show a To use the inferred type, enable PartialTypeSignatures In the type signature for ‘show'’: _ => a -> String diff --git a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr index 4a80c48e30..cca986fab2 100644 --- a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr +++ b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr @@ -8,6 +8,6 @@ InstantiatedNamedWildcardsInConstraints.hs:4:14: In the type signature for ‘foo’: (Enum _a, _) => _a -> (String, b) InstantiatedNamedWildcardsInConstraints.hs:4:18: - Found hole ‘_’ with inferred constraints: (Show b) + Found hole ‘_’ with inferred constraints: Show b To use the inferred type, enable PartialTypeSignatures In the type signature for ‘foo’: (Enum _a, _) => _a -> (String, b) diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr index 5701bfd623..29f700bf89 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr @@ -8,7 +8,7 @@ WildcardInstantiations.hs:5:14: In the type signature for ‘foo’: (Show _a, _) => _a -> _ WildcardInstantiations.hs:5:18: - Found hole ‘_’ with inferred constraints: (Enum w_a) + Found hole ‘_’ with inferred constraints: Enum w_a To use the inferred type, enable PartialTypeSignatures In the type signature for ‘foo’: (Show _a, _) => _a -> _ diff --git a/testsuite/tests/polykinds/T7230.stderr b/testsuite/tests/polykinds/T7230.stderr index b6af606fe7..ed7140f53b 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 d280deb2d8..8ef9ef8f33 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/T7594.stderr b/testsuite/tests/polykinds/T7594.stderr index 31faf3d287..08ab1632e6 100644 --- a/testsuite/tests/polykinds/T7594.stderr +++ b/testsuite/tests/polykinds/T7594.stderr @@ -2,7 +2,7 @@ T7594.hs:33:12: Couldn't match type ‘b’ with ‘IO ()’ ‘b’ is untouchable - inside the constraints ((:&:) c0 Real a) + inside the constraints: (:&:) c0 Real a bound by a type expected by the context: (:&:) c0 Real a => a -> b at T7594.hs:33:8-19 ‘b’ is a rigid type variable bound by diff --git a/testsuite/tests/polykinds/T8566.stderr b/testsuite/tests/polykinds/T8566.stderr index 82c1dedd75..096f058791 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/polykinds/T9222.stderr b/testsuite/tests/polykinds/T9222.stderr index 8e838e7bd5..01869edd45 100644 --- a/testsuite/tests/polykinds/T9222.stderr +++ b/testsuite/tests/polykinds/T9222.stderr @@ -2,7 +2,7 @@ T9222.hs:13:3: Couldn't match type ‘b0’ with ‘b’ ‘b0’ is untouchable - inside the constraints (a ~ '(b0, c0)) + inside the constraints: a ~ '(b0, c0) bound by the type of the constructor ‘Want’: (a ~ '(b0, c0)) => Proxy b0 at T9222.hs:13:3 diff --git a/testsuite/tests/typecheck/should_compile/T7220a.stderr b/testsuite/tests/typecheck/should_compile/T7220a.stderr index ef9900ebd8..ea0331b3dc 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/tc168.stderr b/testsuite/tests/typecheck/should_compile/tc168.stderr index 16df4a466b..4eca08f17c 100644 --- a/testsuite/tests/typecheck/should_compile/tc168.stderr +++ b/testsuite/tests/typecheck/should_compile/tc168.stderr @@ -1,7 +1,7 @@ tc168.hs:17:1: Could not deduce (C a1 (a, b0)) - from the context (C a1 (a, b)) + from the context: C a1 (a, b) bound by the inferred type for ‘g’: C a1 (a, b) => a1 -> a at tc168.hs:17:1-16 The type variable ‘b0’ is ambiguous diff --git a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr index f06ee68043..62354d3f02 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/IPFail.stderr b/testsuite/tests/typecheck/should_fail/IPFail.stderr index 1af8948019..d176d931fe 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/T1897a.stderr b/testsuite/tests/typecheck/should_fail/T1897a.stderr index e0f76ee17c..5e7a590fa5 100644 --- a/testsuite/tests/typecheck/should_fail/T1897a.stderr +++ b/testsuite/tests/typecheck/should_fail/T1897a.stderr @@ -1,7 +1,7 @@ T1897a.hs:9:1: Could not deduce (Wob a0 b) - from the context (Wob a b) + from the context: Wob a b bound by the inferred type for ‘foo’: Wob a b => b -> [b] at T1897a.hs:9:1-24 The type variable ‘a0’ is ambiguous diff --git a/testsuite/tests/typecheck/should_fail/T5300.stderr b/testsuite/tests/typecheck/should_fail/T5300.stderr index 2adbed420b..851d017035 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/T5853.stderr b/testsuite/tests/typecheck/should_fail/T5853.stderr index 21145ca4ce..aa60ffe710 100644 --- a/testsuite/tests/typecheck/should_fail/T5853.stderr +++ b/testsuite/tests/typecheck/should_fail/T5853.stderr @@ -1,20 +1,20 @@ -
-T5853.hs:15:52:
- Could not deduce (fb ~ Subst (Subst fb a) (Elem fb))
- from the context (F (Subst (Subst fb a) b),
- Elem (Subst (Subst fb a) b) ~ b,
- Subst (Subst (Subst fb a) b) (Elem fb) ~ fb,
- Subst fb b ~ Subst (Subst fb a) b,
- F (Subst fb a),
- Elem (Subst fb a) ~ a,
- Elem (Subst (Subst fb a) b) ~ b,
- Subst (Subst (Subst fb a) b) a ~ Subst fb a)
- bound by the RULE "map/map" at T5853.hs:15:2-57
- ‘fb’ is a rigid type variable bound by
- the RULE "map/map" at T5853.hs:15:2
- Relevant bindings include
- f :: b -> Elem fb (bound at T5853.hs:15:19)
- g :: a -> b (bound at T5853.hs:15:21)
- xs :: Subst fb a (bound at T5853.hs:15:23)
- In the expression: (f . g) <$> xs
- When checking the transformation rule "map/map"
+ +T5853.hs:15:52: + Could not deduce: fb ~ Subst (Subst fb a) (Elem fb) + from the context: (F (Subst (Subst fb a) b), + Elem (Subst (Subst fb a) b) ~ b, + Subst (Subst (Subst fb a) b) (Elem fb) ~ fb, + Subst fb b ~ Subst (Subst fb a) b, + F (Subst fb a), + Elem (Subst fb a) ~ a, + Elem (Subst (Subst fb a) b) ~ b, + Subst (Subst (Subst fb a) b) a ~ Subst fb a) + bound by the RULE "map/map" at T5853.hs:15:2-57 + ‘fb’ is a rigid type variable bound by + the RULE "map/map" at T5853.hs:15:2 + Relevant bindings include + f :: b -> Elem fb (bound at T5853.hs:15:19) + g :: a -> b (bound at T5853.hs:15:21) + xs :: Subst fb a (bound at T5853.hs:15:23) + In the expression: (f . g) <$> xs + When checking the transformation rule "map/map" diff --git a/testsuite/tests/typecheck/should_fail/T7279.stderr b/testsuite/tests/typecheck/should_fail/T7279.stderr index 10acbbec8b..33af730620 100644 --- a/testsuite/tests/typecheck/should_fail/T7279.stderr +++ b/testsuite/tests/typecheck/should_fail/T7279.stderr @@ -1,7 +1,7 @@ T7279.hs:6:10: Could not deduce (Show b0) - from the context (Eq a, Show b) + from the context: (Eq a, Show b) bound by an instance declaration: (Eq a, Show b) => Eq (T a) at T7279.hs:6:10-35 The type variable ‘b0’ is ambiguous diff --git a/testsuite/tests/typecheck/should_fail/T7525.stderr b/testsuite/tests/typecheck/should_fail/T7525.stderr index ecf3eb1ab0..4d6f8d3a90 100644 --- a/testsuite/tests/typecheck/should_fail/T7525.stderr +++ b/testsuite/tests/typecheck/should_fail/T7525.stderr @@ -1,8 +1,8 @@ T7525.hs:5:30: - Could not deduce (?b::Bool) + Could not deduce: ?b::Bool arising from a use of implicit parameter ‘?b’ - from the context (?a::Bool) + from the context: ?a::Bool bound by the implicit-parameter binding for ?a at T7525.hs:5:7-31 In the second argument of ‘(&&)’, namely ‘?b’ In the expression: ?a && ?b diff --git a/testsuite/tests/typecheck/should_fail/T7857.stderr b/testsuite/tests/typecheck/should_fail/T7857.stderr index d1e7d3bea2..bc8fed9bf2 100644 --- a/testsuite/tests/typecheck/should_fail/T7857.stderr +++ b/testsuite/tests/typecheck/should_fail/T7857.stderr @@ -1,7 +1,7 @@ T7857.hs:8:11: Could not deduce (PrintfType r0) arising from a use of ‘printf’ - from the context (PrintfArg t) + from the context: PrintfArg t bound by the inferred type of g :: PrintfArg t => t -> b at T7857.hs:8:1-21 The type variable ‘r0’ is ambiguous diff --git a/testsuite/tests/typecheck/should_fail/T8912.stderr b/testsuite/tests/typecheck/should_fail/T8912.stderr index ad343f33c5..4e4515e7a1 100644 --- a/testsuite/tests/typecheck/should_fail/T8912.stderr +++ b/testsuite/tests/typecheck/should_fail/T8912.stderr @@ -1,6 +1,6 @@ T8912.hs:7:10: Illegal implicit parameter ‘?imp::Int’ - In the context: (?imp::Int) + In the context: ?imp::Int While checking an instance declaration In the instance declaration for ‘C [a]’ diff --git a/testsuite/tests/typecheck/should_fail/T9109.stderr b/testsuite/tests/typecheck/should_fail/T9109.stderr index 3f5236b778..1c7e6e5c09 100644 --- a/testsuite/tests/typecheck/should_fail/T9109.stderr +++ b/testsuite/tests/typecheck/should_fail/T9109.stderr @@ -1,14 +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/tcfail034.stderr b/testsuite/tests/typecheck/should_fail/tcfail034.stderr index d2abc05944..f984848ea7 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/tcfail041.stderr b/testsuite/tests/typecheck/should_fail/tcfail041.stderr index c81d30979a..fe116b5277 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail041.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail041.stderr @@ -1,6 +1,6 @@ tcfail041.hs:5:1: Illegal implicit parameter ‘?imp::Int’ - In the context: (?imp::Int) + In the context: ?imp::Int While checking the super-classes of class ‘D’ In the class declaration for ‘D’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail042.stderr b/testsuite/tests/typecheck/should_fail/tcfail042.stderr index 12e0ea6368..8180853c88 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail042.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail042.stderr @@ -1,24 +1,24 @@ -
-tcfail042.hs:15:10:
- Could not deduce (Num a)
- arising from the superclasses of an instance declaration
- from the context (Eq a, Show a)
- bound by the instance declaration at tcfail042.hs:15:10-34
- Possible fix:
- add (Num a) to the context of the instance declaration
- In the instance declaration for ‘Bar [a]’
-
-tcfail042.hs:17:18:
- Could not deduce (Num a) arising from a use of ‘foo’
- from the context (Eq a, Show a)
- bound by the instance declaration at tcfail042.hs:15:10-34
- Possible fix:
- add (Num a) to the context of the instance declaration
- In the expression: foo xs
- In an equation for ‘bar’:
- bar (x : xs)
- = foo xs
- where
- u = x == x
- v = show x
- In the instance declaration for ‘Bar [a]’
+ +tcfail042.hs:15:10: + Could not deduce (Num a) + arising from the superclasses of an instance declaration + from the context: (Eq a, Show a) + bound by the instance declaration at tcfail042.hs:15:10-34 + Possible fix: + add (Num a) to the context of the instance declaration + In the instance declaration for ‘Bar [a]’ + +tcfail042.hs:17:18: + Could not deduce (Num a) arising from a use of ‘foo’ + from the context: (Eq a, Show a) + bound by the instance declaration at tcfail042.hs:15:10-34 + Possible fix: + add (Num a) to the context of the instance declaration + In the expression: foo xs + In an equation for ‘bar’: + bar (x : xs) + = foo xs + where + u = x == x + v = show x + In the instance declaration for ‘Bar [a]’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail067.stderr b/testsuite/tests/typecheck/should_fail/tcfail067.stderr index bdf479c5c8..e539ea881f 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/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr index 9d88d70c80..c08bb58fb1 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr @@ -1,7 +1,7 @@ tcfail072.hs:23:13: Could not deduce (Ord p0) arising from a use of ‘g’ - from the context (Ord p, Ord q) + from the context: (Ord p, Ord q) bound by the type signature for: g :: (Ord p, Ord q) => AB p q -> Bool at tcfail072.hs:22:6-38 diff --git a/testsuite/tests/typecheck/should_fail/tcfail080.stderr b/testsuite/tests/typecheck/should_fail/tcfail080.stderr index fcd974da90..3b8d8e9eb9 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail080.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail080.stderr @@ -1,7 +1,7 @@ tcfail080.hs:27:1: Could not deduce (Collection c0 a) - from the context (Collection c a) + from the context: Collection c a bound by the inferred type for ‘q’: Collection c a => a -> Bool at tcfail080.hs:27:1-27 The type variable ‘c0’ is ambiguous diff --git a/testsuite/tests/typecheck/should_fail/tcfail097.stderr b/testsuite/tests/typecheck/should_fail/tcfail097.stderr index b5be488b40..e4a611774d 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/tcfail098.stderr b/testsuite/tests/typecheck/should_fail/tcfail098.stderr index 8ac2960d3c..1d95319566 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail098.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail098.stderr @@ -1,7 +1,7 @@ tcfail098.hs:12:10: Could not deduce (Bar a0) - from the context (Bar a) + from the context: Bar a bound by an instance declaration: Bar a => Bar Bool at tcfail098.hs:12:10-26 The type variable ‘a0’ is ambiguous diff --git a/testsuite/tests/typecheck/should_fail/tcfail102.stderr b/testsuite/tests/typecheck/should_fail/tcfail102.stderr index f32dead217..6bd3750138 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/tcfail108.stderr b/testsuite/tests/typecheck/should_fail/tcfail108.stderr index 490640f74b..b23e9d91a5 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail108.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail108.stderr @@ -2,6 +2,6 @@ tcfail108.hs:7:10: Non type-variable argument in the constraint: Eq (f (Rec f)) (Use FlexibleContexts to permit this) - In the context: (Eq (f (Rec f))) + In the context: Eq (f (Rec f)) While checking an instance declaration In the instance declaration for ‘Eq (Rec f)’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail130.stderr b/testsuite/tests/typecheck/should_fail/tcfail130.stderr index 8e71045bef..7640031cbd 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail130.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail130.stderr @@ -1,5 +1,5 @@ tcfail130.hs:10:7: - Unbound implicit parameter (?x::Int) arising from a use of ‘woggle’ + Unbound implicit parameter ?x::Int arising from a use of ‘woggle’ In the expression: woggle 3 In an equation for ‘foo’: foo = woggle 3 diff --git a/testsuite/tests/typecheck/should_fail/tcfail142.stderr b/testsuite/tests/typecheck/should_fail/tcfail142.stderr index 3cde64a4bc..c6553c1de6 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/tcfail181.stderr b/testsuite/tests/typecheck/should_fail/tcfail181.stderr index 84ba8768f4..e6380995bb 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail181.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail181.stderr @@ -1,7 +1,7 @@ tcfail181.hs:17:9: Could not deduce (Monad m0) arising from a use of ‘foo’ - from the context (Monad m) + from the context: Monad m bound by the inferred type of wog :: Monad m => t -> Something (m Bool) e at tcfail181.hs:17:1-30 diff --git a/testsuite/tests/typecheck/should_fail/tcfail208.stderr b/testsuite/tests/typecheck/should_fail/tcfail208.stderr index ec3f4c668b..4b88fc0e58 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) diff --git a/testsuite/tests/typecheck/should_fail/tcfail211.stderr b/testsuite/tests/typecheck/should_fail/tcfail211.stderr index 0d9d23d9b1..614aaf59fa 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail211.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail211.stderr @@ -1,6 +1,6 @@ tcfail211.hs:5:1: Illegal implicit parameter ‘?imp::Int’ - In the context: (?imp::Int) + In the context: ?imp::Int While checking the super-classes of class ‘D’ In the class declaration for ‘D’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail213.stderr b/testsuite/tests/typecheck/should_fail/tcfail213.stderr index f54379481f..a6b63bd9f1 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail213.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail213.stderr @@ -2,6 +2,6 @@ tcfail213.hs:8:1: Illegal constraint ‘F a’ in a superclass/instance context (Use UndecidableInstances to permit this) - In the context: (F a) + In the context: F a While checking the super-classes of class ‘C’ In the class declaration for ‘C’ diff --git a/testsuite/tests/typecheck/should_fail/tcfail214.stderr b/testsuite/tests/typecheck/should_fail/tcfail214.stderr index 93101f45cc..5520a3eff1 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail214.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail214.stderr @@ -2,6 +2,6 @@ tcfail214.hs:9:10: Illegal constraint ‘F a’ in a superclass/instance context (Use UndecidableInstances to permit this) - In the context: (F a) + In the context: F a While checking an instance declaration In the instance declaration for ‘C [a]’ |