diff options
Diffstat (limited to 'testsuite/tests/typecheck')
36 files changed, 151 insertions, 115 deletions
diff --git a/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr-ghc b/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr-ghc index 04d55b4447..17d8e2cf84 100644 --- a/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr-ghc +++ b/testsuite/tests/typecheck/prog001/typecheck.prog001.stderr-ghc @@ -1,4 +1,5 @@ -
-B.hs:7:10:
- Warning: No explicit method or default declaration for `row'
- In the instance declaration for `Matrix Bool Val'
+ +B.hs:7:10: + Warning: No explicit method or default declaration for `row' + In the instance declaration for `Matrix Bool Val' + diff --git a/testsuite/tests/typecheck/should_compile/FD1.stderr b/testsuite/tests/typecheck/should_compile/FD1.stderr index 6f98877b84..0bec66931a 100644 --- a/testsuite/tests/typecheck/should_compile/FD1.stderr +++ b/testsuite/tests/typecheck/should_compile/FD1.stderr @@ -4,9 +4,9 @@ FD1.hs:16:1: from the context (E a (Int -> Int)) bound by the type signature for plus :: E a (Int -> Int) => Int -> a - at FD1.hs:16:1-16 + at FD1.hs:15:9-38 `a' is a rigid type variable bound by the type signature for plus :: E a (Int -> Int) => Int -> a - at FD1.hs:16:1 + at FD1.hs:15:12 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 2b2fee3eb9..392f92723d 100644 --- a/testsuite/tests/typecheck/should_compile/FD2.stderr +++ b/testsuite/tests/typecheck/should_compile/FD2.stderr @@ -7,19 +7,19 @@ FD2.hs:26:36: or from (Elem a e) bound by the type signature for foldr1 :: Elem a e => (e -> e -> e) -> a -> e - at FD2.hs:(22,3)-(26,39) + at FD2.hs:21:13-47 or from (Elem a e1) bound by the type signature for mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1 - at FD2.hs:(25,12)-(26,39) + at FD2.hs:24:18-54 `e' is a rigid type variable bound by the type signature for foldr1 :: Elem a e => (e -> e -> e) -> a -> e - at FD2.hs:22:3 + at FD2.hs:21:20 `e1' is a rigid type variable bound by the type signature for mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1 - at FD2.hs:25:12 + at FD2.hs:24:25 In the first argument of `f', namely `x' In the first argument of `Just', namely `(f x y)' In the expression: Just (f x y) diff --git a/testsuite/tests/typecheck/should_compile/FD3.stderr b/testsuite/tests/typecheck/should_compile/FD3.stderr index 6f6aa8a1a2..9144b5fdb3 100644 --- a/testsuite/tests/typecheck/should_compile/FD3.stderr +++ b/testsuite/tests/typecheck/should_compile/FD3.stderr @@ -3,7 +3,7 @@ FD3.hs:15:15: Couldn't match type `a' with `([Char], a)' `a' is a rigid type variable bound by the type signature for translate :: (String, a) -> A a - at FD3.hs:15:1 + at FD3.hs:14:23 When using functional dependencies to combine MkA a a, arising from the dependency `a -> b' diff --git a/testsuite/tests/typecheck/should_compile/tc141.stderr b/testsuite/tests/typecheck/should_compile/tc141.stderr index 2fdf1fa99c..0d08303345 100644 --- a/testsuite/tests/typecheck/should_compile/tc141.stderr +++ b/testsuite/tests/typecheck/should_compile/tc141.stderr @@ -1,6 +1,43 @@ -tc141.hs:11:15: Not in scope: type variable `a' +tc141.hs:11:12: + You cannot bind scoped type variable `a' + in a pattern binding signature + In the pattern: p :: a + In the pattern: (p :: a, q :: a) + In a pattern binding: (p :: a, q :: a) = x -tc141.hs:11:20: Not in scope: type variable `a' +tc141.hs:11:31: + Couldn't match expected type `a1' with actual type `a' + `a1' is a rigid type variable bound by + an expression type signature: a1 at tc141.hs:11:31 + `a' is a rigid type variable bound by + the inferred type of f :: (a, a) -> (t, a) at tc141.hs:11:1 + In the expression: q :: a + In the expression: (q :: a, p) + In the expression: let (p :: a, q :: a) = x in (q :: a, p) -tc141.hs:13:16: Not in scope: type variable `a' +tc141.hs:13:13: + You cannot bind scoped type variable `a' + in a pattern binding signature + In the pattern: y :: a + In a pattern binding: y :: a = a + In the expression: + let y :: a = a in + let + v :: a + v = b + in v + +tc141.hs:15:18: + Couldn't match expected type `a1' with actual type `t1' + `a1' is a rigid type variable bound by + the type signature for v :: a1 at tc141.hs:14:19 + `t1' is a rigid type variable bound by + the inferred type of g :: t -> t1 -> a at tc141.hs:13:1 + In the expression: b + In an equation for `v': v = b + In the expression: + let + v :: a + v = b + in v diff --git a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr index 229b14a15b..24b2149bf5 100644 --- a/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr +++ b/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.stderr @@ -7,7 +7,7 @@ FailDueToGivenOverlapping.hs:27:9: Matching givens (or their superclasses): (E [Int]) bound by the type signature for bar :: E [Int] => () -> () - at FailDueToGivenOverlapping.hs:27:1-23 + at FailDueToGivenOverlapping.hs:26:8-26 (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 f5a49c89d0..f6df41763f 100644 --- a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr +++ b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr @@ -1,9 +1,9 @@ -FrozenErrorTests.hs:11:1: +FrozenErrorTests.hs:10:8: Couldn't match type `a' with `T a' `a' is a rigid type variable bound by the type signature for foo :: a ~ T a => a -> a - at FrozenErrorTests.hs:11:1 + at FrozenErrorTests.hs:10:15 Inaccessible code in the type signature for foo :: a ~ T a => a -> a diff --git a/testsuite/tests/typecheck/should_fail/IPFail.stderr b/testsuite/tests/typecheck/should_fail/IPFail.stderr index 7d0d8980af..dbb25d553f 100644 --- a/testsuite/tests/typecheck/should_fail/IPFail.stderr +++ b/testsuite/tests/typecheck/should_fail/IPFail.stderr @@ -3,7 +3,7 @@ IPFail.hs:6:18: Could not deduce (Num Bool) arising from the literal `5' from the context (?x::Int) bound by the type signature for f0 :: (?x::Int) => () -> Bool - at IPFail.hs:6:1-24 + at IPFail.hs:5:7-31 Possible fix: add (Num Bool) to the context of the type signature for f0 :: (?x::Int) => () -> Bool diff --git a/testsuite/tests/typecheck/should_fail/T1899.stderr b/testsuite/tests/typecheck/should_fail/T1899.stderr index 5779301745..5a37c8949a 100644 --- a/testsuite/tests/typecheck/should_fail/T1899.stderr +++ b/testsuite/tests/typecheck/should_fail/T1899.stderr @@ -3,7 +3,7 @@ T1899.hs:14:36: Couldn't match type `a' with `Proposition a0' `a' is a rigid type variable bound by the type signature for transRHS :: [a] -> Int -> Constraint a - at T1899.hs:10:2 + at T1899.hs:9:15 Expected type: [Proposition a0] Actual type: [a] In the first argument of `Auxiliary', namely `varSet' diff --git a/testsuite/tests/typecheck/should_fail/T2538.stderr b/testsuite/tests/typecheck/should_fail/T2538.stderr index e4e9a7551a..b2d1d3aeb6 100644 --- a/testsuite/tests/typecheck/should_fail/T2538.stderr +++ b/testsuite/tests/typecheck/should_fail/T2538.stderr @@ -1,14 +1,14 @@ -
-T2538.hs:6:1:
- Illegal polymorphic or qualified type: Eq a => a -> a
- Perhaps you intended to use -XRankNTypes or -XRank2Types
- In the type signature for `f': f :: (Eq a => a -> a) -> Int
-
-T2538.hs:9:1:
- Illegal polymorphic or qualified type: Eq a => a -> a
- Perhaps you intended to use -XImpredicativeTypes
- In the type signature for `g': g :: [Eq a => a -> a] -> Int
-
-T2538.hs:12:1:
- Illegal polymorphic or qualified type: Eq a => a -> a
- In the type signature for `h': h :: Ix (Eq a => a -> a) => Int
+ +T2538.hs:6:6: + Illegal polymorphic or qualified type: Eq a => a -> a + Perhaps you intended to use -XRankNTypes or -XRank2Types + In the type signature for `f': f :: (Eq a => a -> a) -> Int + +T2538.hs:9:6: + Illegal polymorphic or qualified type: Eq a => a -> a + Perhaps you intended to use -XImpredicativeTypes + In the type signature for `g': g :: [Eq a => a -> a] -> Int + +T2538.hs:12:6: + Illegal polymorphic or qualified type: Eq a => a -> a + In the type signature for `h': h :: Ix (Eq a => a -> a) => Int diff --git a/testsuite/tests/typecheck/should_fail/T2714.stderr b/testsuite/tests/typecheck/should_fail/T2714.stderr index 18e36fa800..e7f3b4aa92 100644 --- a/testsuite/tests/typecheck/should_fail/T2714.stderr +++ b/testsuite/tests/typecheck/should_fail/T2714.stderr @@ -3,7 +3,7 @@ T2714.hs:8:5: Couldn't match type `a' with `f0 b' `a' is a rigid type variable bound by the type signature for f :: ((a -> b) -> b) -> forall c. c -> a - at T2714.hs:8:1 + at T2714.hs:7:8 Expected type: ((a -> b) -> b) -> c -> a Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b In the expression: ffmap diff --git a/testsuite/tests/typecheck/should_fail/T5300.stderr b/testsuite/tests/typecheck/should_fail/T5300.stderr index a051692bc5..272f8b5762 100644 --- a/testsuite/tests/typecheck/should_fail/T5300.stderr +++ b/testsuite/tests/typecheck/should_fail/T5300.stderr @@ -5,7 +5,7 @@ T5300.hs:15:9: bound by the type signature for f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) => a1 -> StateT (T b2) m a2 - at T5300.hs:15:1-36 + at T5300.hs:14:7-69 The type variable `c0' is ambiguous Possible fix: add a type signature that fixes these type variable(s) In the first argument of `(>>=)', namely `f1 fm' diff --git a/testsuite/tests/typecheck/should_fail/tcfail034.stderr b/testsuite/tests/typecheck/should_fail/tcfail034.stderr index db8e148eb9..38b04c10c6 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail034.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail034.stderr @@ -3,7 +3,7 @@ tcfail034.hs:17:13: Could not deduce (Integral a) arising from a use of `mod' from the context (Num a, Eq a) bound by the type signature for test :: (Num a, Eq a) => a -> Bool - at tcfail034.hs:17:1-25 + at tcfail034.hs:16:7-32 Possible fix: add (Integral a) to the context of the type signature for test :: (Num a, Eq a) => a -> Bool diff --git a/testsuite/tests/typecheck/should_fail/tcfail067.stderr b/testsuite/tests/typecheck/should_fail/tcfail067.stderr index 513f5e9977..6be6ef494b 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail067.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail067.stderr @@ -1,6 +1,6 @@ -tcfail067.hs:1:14: - Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. +tcfail067.hs:1:14: Warning: + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. tcfail067.hs:12:16: No instance for (Ord a) @@ -20,7 +20,7 @@ tcfail067.hs:46:12: from the context (Show a) bound by the type signature for showRange :: Show a => SubRange a -> String - at tcfail067.hs:(46,1)-(47,58) + at tcfail067.hs:45:14-43 Possible fix: add (Ord a) to the context of the type signature for showRange :: Show a => SubRange a -> String @@ -59,7 +59,7 @@ tcfail067.hs:74:5: bound by the type signature for numSubRangeBinOp :: Num a => (a -> a -> a) -> SubRange a -> SubRange a -> SubRange a - at tcfail067.hs:(73,1)-(76,53) + at tcfail067.hs:(71,21)-(72,58) Possible fix: add (Ord a) to the context of the type signature for diff --git a/testsuite/tests/typecheck/should_fail/tcfail068.stderr b/testsuite/tests/typecheck/should_fail/tcfail068.stderr index 11d39617db..4b9c8064a7 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail068.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail068.stderr @@ -4,14 +4,14 @@ tcfail068.hs:14:9: from the context (Constructed a) bound by the type signature for itgen :: Constructed a => (Int, Int) -> a -> IndTree s a - at tcfail068.hs:(12,1)-(14,31) + at tcfail068.hs:11:10-55 `s1' is a rigid type variable bound by a type expected by the context: GHC.ST.ST s1 (IndTree s a) at tcfail068.hs:13:9 `s' is a rigid type variable bound by the type signature for itgen :: Constructed a => (Int, Int) -> a -> IndTree s a - at tcfail068.hs:12:1 + at tcfail068.hs:11:53 Expected type: GHC.ST.ST s1 (IndTree s a) Actual type: GHC.ST.ST s1 (STArray s1 (Int, Int) a) In the return type of a call of `newSTArray' @@ -25,12 +25,12 @@ tcfail068.hs:19:21: bound by the type signature for itiap :: Constructed a => (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a - at tcfail068.hs:(17,1)-(21,19) + at tcfail068.hs:16:10-75 `s' is a rigid type variable bound by the type signature for itiap :: Constructed a => (Int, Int) -> (a -> a) -> IndTree s a -> IndTree s a - at tcfail068.hs:17:1 + at tcfail068.hs:16:58 `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 @@ -48,12 +48,12 @@ tcfail068.hs:24:35: bound by the type signature for itrap :: Constructed a => ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a - at tcfail068.hs:(24,1)-(32,41) + at tcfail068.hs:23:10-87 `s' is a rigid type variable bound by the type signature for itrap :: Constructed a => ((Int, Int), (Int, Int)) -> (a -> a) -> IndTree s a -> IndTree s a - at tcfail068.hs:24:1 + at tcfail068.hs:23:70 `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 @@ -75,7 +75,7 @@ tcfail068.hs:36:46: -> c -> IndTree s b -> (c, IndTree s b) - at tcfail068.hs:(36,1)-(45,66) + at tcfail068.hs:(34,15)-(35,62) `s' is a rigid type variable bound by the type signature for itrapstate :: Constructed b => @@ -86,7 +86,7 @@ tcfail068.hs:36:46: -> c -> IndTree s b -> (c, IndTree s b) - at tcfail068.hs:36:1 + at tcfail068.hs:35:40 `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 diff --git a/testsuite/tests/typecheck/should_fail/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr index 4d6bd867b2..052083f237 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr @@ -4,7 +4,7 @@ tcfail072.hs:23:13: from the context (Ord p, Ord q) bound by the type signature for g :: (Ord p, Ord q) => AB p q -> Bool - at tcfail072.hs:23:1-15 + at tcfail072.hs:22:6-38 The type variables `p0', `q0' are ambiguous Possible fix: add a type signature that fixes these type variable(s) In the expression: g A diff --git a/testsuite/tests/typecheck/should_fail/tcfail097.stderr b/testsuite/tests/typecheck/should_fail/tcfail097.stderr index 967b172bb9..2fabae4b40 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail097.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail097.stderr @@ -1,6 +1,6 @@ -
-tcfail097.hs:5:1:
- Ambiguous constraint `Eq a'
- At least one of the forall'd type variables mentioned by the constraint
- must be reachable from the type after the '=>'
- In the type signature for `f': f :: Eq a => Int -> Int
+ +tcfail097.hs:5:6: + Ambiguous constraint `Eq a' + At least one of the forall'd type variables mentioned by the constraint + must be reachable from the type after the '=>' + In the type signature for `f': f :: Eq a => Int -> Int diff --git a/testsuite/tests/typecheck/should_fail/tcfail101.stderr b/testsuite/tests/typecheck/should_fail/tcfail101.stderr index 0d82b50750..5cca6de0a3 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail101.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail101.stderr @@ -1,4 +1,4 @@ -tcfail101.hs:9:1: +tcfail101.hs:9:6: Type synonym `A' should have 1 argument, but has been given none In the type signature for `f': f :: T A diff --git a/testsuite/tests/typecheck/should_fail/tcfail102.stderr b/testsuite/tests/typecheck/should_fail/tcfail102.stderr index 792c941081..541bb432fa 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail102.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail102.stderr @@ -1,18 +1,18 @@ -
-tcfail102.hs:1:14:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail102.hs:9:15:
- Could not deduce (Integral (Ratio a)) arising from a use of `p'
- from the context (Integral a)
- bound by the type signature for
- f :: Integral a => P (Ratio a) -> P (Ratio a)
- at tcfail102.hs:9:1-19
- Possible fix:
- add (Integral (Ratio a)) to the context of
- the type signature for
- f :: Integral a => P (Ratio a) -> P (Ratio a)
- or add an instance declaration for (Integral (Ratio a))
- In the `p' field of a record
- In the expression: x {p = p x}
- In an equation for `f': f x = x {p = p x}
+ +tcfail102.hs:1:14: Warning: + -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. + +tcfail102.hs:9:15: + Could not deduce (Integral (Ratio a)) arising from a use of `p' + from the context (Integral a) + bound by the type signature for + f :: Integral a => P (Ratio a) -> P (Ratio a) + at tcfail102.hs:8:6-45 + Possible fix: + add (Integral (Ratio a)) to the context of + the type signature for + f :: Integral a => P (Ratio a) -> P (Ratio a) + or add an instance declaration for (Integral (Ratio a)) + In the `p' field of a record + In the expression: x {p = p x} + In an equation for `f': f x = x {p = p x} diff --git a/testsuite/tests/typecheck/should_fail/tcfail103.stderr b/testsuite/tests/typecheck/should_fail/tcfail103.stderr index 7d6e4dfd6c..5a9b1839f6 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail103.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail103.stderr @@ -2,9 +2,9 @@ tcfail103.hs:15:23: Couldn't match type `t' with `s' `t' is a rigid type variable bound by - the type signature for f :: ST t Int at tcfail103.hs:11:1 + the type signature for f :: ST t Int at tcfail103.hs:10:8 `s' is a rigid type variable bound by - the type signature for g :: ST s Int at tcfail103.hs:15:9 + the type signature for g :: ST s Int at tcfail103.hs:13:17 Expected type: STRef s Int Actual type: STRef t Int In the first argument of `readSTRef', namely `v' diff --git a/testsuite/tests/typecheck/should_fail/tcfail107.stderr b/testsuite/tests/typecheck/should_fail/tcfail107.stderr index eae3610c1d..92a89b7544 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail107.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail107.stderr @@ -1,5 +1,5 @@ -tcfail107.hs:13:1: +tcfail107.hs:13:9: Type synonym `Const' should have 2 arguments, but has been given 1 In the type signature for `test': test :: Thing (Const Int) -> Thing (Const Int) diff --git a/testsuite/tests/typecheck/should_fail/tcfail127.stderr b/testsuite/tests/typecheck/should_fail/tcfail127.stderr index 8fa64fb204..021120314f 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail127.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail127.stderr @@ -1,5 +1,5 @@ -
-tcfail127.hs:3:1:
- Illegal polymorphic or qualified type: Num a => a -> a
- Perhaps you intended to use -XImpredicativeTypes
- In the type signature for `foo': foo :: IO (Num a => a -> a)
+ +tcfail127.hs:3:8: + Illegal polymorphic or qualified type: Num a => a -> a + Perhaps you intended to use -XImpredicativeTypes + In the type signature for `foo': foo :: IO (Num a => a -> a) diff --git a/testsuite/tests/typecheck/should_fail/tcfail129.stderr b/testsuite/tests/typecheck/should_fail/tcfail129.stderr index f9ee8a567d..f6ee765ce4 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail129.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail129.stderr @@ -1,11 +1,11 @@ -tcfail129.hs:12:8: +tcfail129.hs:12:21: Type synonym `Foo' should have 1 argument, but has been given none In an expression type signature: Bar Foo In the expression: undefined :: Bar Foo In an equation for `blah': blah = undefined :: Bar Foo -tcfail129.hs:17:9: +tcfail129.hs:17:22: Type synonym `Foo1' should have 1 argument, but has been given none In an expression type signature: Bar1 Foo1 In the expression: undefined :: Bar1 Foo1 diff --git a/testsuite/tests/typecheck/should_fail/tcfail131.stderr b/testsuite/tests/typecheck/should_fail/tcfail131.stderr index 548e063929..9c93a0f916 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail131.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail131.stderr @@ -1,11 +1,11 @@ -
-tcfail131.hs:7:9:
- Could not deduce (b ~ Integer)
- from the context (Num b)
- bound by the type signature for g :: Num b => b -> b
- at tcfail131.hs:7:3-13
- `b' is a rigid type variable bound by
- the type signature for g :: Num b => b -> b at tcfail131.hs:7:3
- In the return type of a call of `f'
- In the expression: f x x
- In an equation for `g': g x = f x x
+ +tcfail131.hs:7:9: + Could not deduce (b ~ Integer) + from the context (Num b) + bound by the type signature for g :: Num b => b -> b + at tcfail131.hs:6:8-22 + `b' is a rigid type variable bound by + the type signature for g :: Num b => b -> b at tcfail131.hs:6:12 + In the return type of a call of `f' + In the expression: f x x + In an equation for `g': g x = f x x diff --git a/testsuite/tests/typecheck/should_fail/tcfail153.stderr b/testsuite/tests/typecheck/should_fail/tcfail153.stderr index ca0b42b054..e648dc556d 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail153.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail153.stderr @@ -2,7 +2,7 @@ tcfail153.hs:6:9: Couldn't match expected type `a' with actual type `Bool' `a' is a rigid type variable bound by - the type signature for f :: a -> [a] at tcfail153.hs:6:1 + the type signature for f :: a -> [a] at tcfail153.hs:5:6 In the first argument of `g', namely `x' In the expression: g x In an equation for `f': diff --git a/testsuite/tests/typecheck/should_fail/tcfail162.stderr b/testsuite/tests/typecheck/should_fail/tcfail162.stderr index 53f0129f48..d1bb892ab0 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail162.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail162.stderr @@ -1,6 +1,6 @@ tcfail162.hs:10:33: Expecting one more argument to `ForeignPtr' - In the type `{-# UNPACK #-} !ForeignPtr' + In the type `ForeignPtr' In the definition of data constructor `Foo' In the data type declaration for `Foo' diff --git a/testsuite/tests/typecheck/should_fail/tcfail174.stderr b/testsuite/tests/typecheck/should_fail/tcfail174.stderr index 89135d656e..52a627ad9f 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail174.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail174.stderr @@ -23,7 +23,7 @@ tcfail174.hs:16:14: `a' is a rigid type variable bound by the type forall a. a -> a at tcfail174.hs:16:14 `b' is a rigid type variable bound by - the type signature for h2 :: Capture b at tcfail174.hs:16:1 + the type signature for h2 :: Capture b at tcfail174.hs:15:15 Expected type: Capture (forall x. x -> b) Actual type: Capture (forall a. a -> a) In the first argument of `Capture', namely `g' diff --git a/testsuite/tests/typecheck/should_fail/tcfail175.stderr b/testsuite/tests/typecheck/should_fail/tcfail175.stderr index 4fe5bfbe41..ded6ea65eb 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail175.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail175.stderr @@ -3,6 +3,6 @@ tcfail175.hs:11:1: Couldn't match expected type `a' with actual type `String -> String -> String' `a' is a rigid type variable bound by - the type signature for evalRHS :: Int -> a at tcfail175.hs:11:1 + the type signature for evalRHS :: Int -> a at tcfail175.hs:10:19 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 a24d404e15..7a29705723 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail179.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail179.stderr @@ -2,7 +2,7 @@ tcfail179.hs:14:39: Couldn't match expected type `s' with actual type `x' `s' is a rigid type variable bound by - the type signature for run :: T s -> Int at tcfail179.hs:13:1 + the type signature for run :: T s -> Int at tcfail179.hs:12:10 `x' is a rigid type variable bound by a pattern with constructor T :: forall s x. (s -> (x -> s) -> (x, s, Int)) -> T s, diff --git a/testsuite/tests/typecheck/should_fail/tcfail196.stderr b/testsuite/tests/typecheck/should_fail/tcfail196.stderr index 79cc7266eb..ea6f16fd98 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail196.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail196.stderr @@ -1,5 +1,5 @@ -
-tcfail196.hs:5:1:
- Illegal polymorphic or qualified type: forall a. a
- In the type signature for `bar':
- bar :: Num (forall a. a) => Int -> Int
+ +tcfail196.hs:5:8: + Illegal polymorphic or qualified type: forall a. a + In the type signature for `bar': + bar :: Num (forall a. a) => Int -> Int diff --git a/testsuite/tests/typecheck/should_fail/tcfail197.stderr b/testsuite/tests/typecheck/should_fail/tcfail197.stderr index 3abe57be7b..464dacb078 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail197.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail197.stderr @@ -1,6 +1,5 @@ -tcfail197.hs:5:1: +tcfail197.hs:5:8: Illegal polymorphic or qualified type: forall a. a Perhaps you intended to use -XImpredicativeTypes - In the type signature for `foo': - foo :: [forall a. a] -> Int + In the type signature for `foo': foo :: [forall a. a] -> Int diff --git a/testsuite/tests/typecheck/should_fail/tcfail201.stderr b/testsuite/tests/typecheck/should_fail/tcfail201.stderr index f45b899b90..0cb16557f8 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail201.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail201.stderr @@ -5,7 +5,7 @@ tcfail201.hs:18:28: the type signature for gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b) -> (forall g. g -> c g) -> a -> c a - at tcfail201.hs:16:1 + at tcfail201.hs:15:78 In the pattern: DocParagraph hsDoc In a case alternative: (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 76b5c7ebd2..3283089afc 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:11:1 + the type signature for c :: a -> (a, Bool) at tcfail206.hs:10:6 Expected type: a -> (a, Bool) Actual type: a -> (a, a) In the expression: (True || False,) @@ -40,7 +40,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:20:1 + the type signature for f :: a -> (# a, Bool #) at tcfail206.hs:19:6 Expected type: a -> (# a, Bool #) Actual type: a -> (# a, a #) In the expression: (# True || False, #) diff --git a/testsuite/tests/typecheck/should_fail/tcfail208.stderr b/testsuite/tests/typecheck/should_fail/tcfail208.stderr index 64200a696d..0a4ce1cd4d 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail208.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail208.stderr @@ -4,7 +4,7 @@ tcfail208.hs:4:19: from the context (Monad m, Eq a) bound by the type signature for f :: (Monad m, Eq a) => a -> m a -> Bool - at tcfail208.hs:4:1-23 + at tcfail208.hs:3:6-40 Possible fix: add (Eq (m a)) to the context of the type signature for f :: (Monad m, Eq a) => a -> m a -> Bool diff --git a/testsuite/tests/typecheck/should_fail/tcfail209.stderr b/testsuite/tests/typecheck/should_fail/tcfail209.stderr index ba90b2d163..b5329ff6dc 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail209.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail209.stderr @@ -1,10 +1,10 @@ -tcfail209.hs:5:1: +tcfail209.hs:5:6: Illegal irreducible constraint Showish a (Use -XConstraintKinds to permit this) In the type signature for `f': f :: Showish a => a -> a -tcfail209.hs:8:1: +tcfail209.hs:8:6: Illegal tuple constraint (Show a, Num a) (Use -XConstraintKinds to permit this) In the type signature for `g': diff --git a/testsuite/tests/typecheck/should_run/tcrun041.hs b/testsuite/tests/typecheck/should_run/tcrun041.hs index dbdebf7687..6342fcd0e2 100644 --- a/testsuite/tests/typecheck/should_run/tcrun041.hs +++ b/testsuite/tests/typecheck/should_run/tcrun041.hs @@ -25,7 +25,6 @@ h = (# ,1, #) unchanged :: a -> (# Int #) unchanged _binding = (# 1 #) - main = do print (a 1, b False, c "Hello", c 1337, d "Yeah" "Baby") case e 1 of { (# x1, x2 #) -> |