summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile')
-rw-r--r--testsuite/tests/typecheck/should_compile/FD1.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/FD2.stderr15
-rw-r--r--testsuite/tests/typecheck/should_compile/PushHRIf.hs7
-rw-r--r--testsuite/tests/typecheck/should_compile/T10072.stderr16
-rw-r--r--testsuite/tests/typecheck/should_compile/T10971a.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/T2494.stderr58
-rw-r--r--testsuite/tests/typecheck/should_compile/Vta1.hs95
-rw-r--r--testsuite/tests/typecheck/should_compile/Vta2.hs14
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T3
-rw-r--r--testsuite/tests/typecheck/should_compile/holes.stderr66
-rw-r--r--testsuite/tests/typecheck/should_compile/holes3.stderr72
-rw-r--r--testsuite/tests/typecheck/should_compile/tc141.stderr16
-rw-r--r--testsuite/tests/typecheck/should_compile/tc168.stderr24
-rw-r--r--testsuite/tests/typecheck/should_compile/tc211.stderr77
-rw-r--r--testsuite/tests/typecheck/should_compile/tc243.stderr4
15 files changed, 280 insertions, 193 deletions
diff --git a/testsuite/tests/typecheck/should_compile/FD1.stderr b/testsuite/tests/typecheck/should_compile/FD1.stderr
index 19d698294a..395217af8b 100644
--- a/testsuite/tests/typecheck/should_compile/FD1.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD1.stderr
@@ -1,6 +1,6 @@
FD1.hs:16:1: error:
- • Couldn't match expected type ‘Int -> Int’ with actual type ‘a’
+ • Couldn't match expected type ‘a’ with actual type ‘Int -> Int’
‘a’ is a rigid type variable bound by
the type signature for:
plus :: forall a. E a (Int -> Int) => Int -> a
diff --git a/testsuite/tests/typecheck/should_compile/FD2.stderr b/testsuite/tests/typecheck/should_compile/FD2.stderr
index 93997c52ec..ff3a923988 100644
--- a/testsuite/tests/typecheck/should_compile/FD2.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD2.stderr
@@ -1,15 +1,16 @@
-FD2.hs:26:34: error:
- • Couldn't match expected type ‘e1’ with actual type ‘e’
- ‘e’ is a rigid type variable bound by
- the type signature for:
- foldr1 :: forall e. Elem a e => (e -> e -> e) -> a -> e
- at FD2.hs:21:13
+FD2.hs:26:36: error:
+ • Couldn't match expected type ‘e’ with actual type ‘e1’
‘e1’ is a rigid type variable bound by
the type signature for:
mf :: forall e1. Elem a e1 => e1 -> Maybe e1 -> Maybe e1
at FD2.hs:24:18
- • In the first argument of ‘Just’, namely ‘(f x y)’
+ ‘e’ is a rigid type variable bound by
+ the type signature for:
+ foldr1 :: forall e. Elem a e => (e -> e -> e) -> a -> e
+ at FD2.hs:21:13
+ • 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)
• Relevant bindings include
y :: e1 (bound at FD2.hs:26:23)
diff --git a/testsuite/tests/typecheck/should_compile/PushHRIf.hs b/testsuite/tests/typecheck/should_compile/PushHRIf.hs
new file mode 100644
index 0000000000..f6839133a0
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/PushHRIf.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE RankNTypes #-}
+
+module PushHRIf where
+
+foo = (if True then id else id) :: forall a. a -> a
+
+bar = (foo 'x', foo True)
diff --git a/testsuite/tests/typecheck/should_compile/T10072.stderr b/testsuite/tests/typecheck/should_compile/T10072.stderr
index ba15398874..eb14ad8de5 100644
--- a/testsuite/tests/typecheck/should_compile/T10072.stderr
+++ b/testsuite/tests/typecheck/should_compile/T10072.stderr
@@ -1,8 +1,8 @@
-
-T10072.hs:3:31: error:
- Found type wildcard ‘_’ standing for ‘b’
- Where: ‘b’ is a rigid type variable bound by
- the RULE "map/empty" at T10072.hs:3:1
- To use the inferred type, enable PartialTypeSignatures
- In a RULE for ‘f’: a -> _
- When checking the transformation rule "map/empty"
+
+T10072.hs:3:31: error:
+ • Found type wildcard ‘_’ standing for ‘b’
+ Where: ‘b’ is a rigid type variable bound by
+ the RULE "map/empty" at T10072.hs:3:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In a RULE for ‘f’: a -> _
+ When checking the transformation rule "map/empty"
diff --git a/testsuite/tests/typecheck/should_compile/T10971a.stderr b/testsuite/tests/typecheck/should_compile/T10971a.stderr
index 7ca7680c52..eea8a11ea3 100644
--- a/testsuite/tests/typecheck/should_compile/T10971a.stderr
+++ b/testsuite/tests/typecheck/should_compile/T10971a.stderr
@@ -34,9 +34,9 @@ T10971a.hs:9:6: warning:
T10971a.hs:9:31: warning:
• Defaulting the following constraints to type ‘[]’
- (Foldable t0) arising from a use of ‘length’ at T10971a.hs:9:31-36
+ (Foldable t0) arising from a use of ‘length’ at T10971a.hs:9:31-38
(Traversable t0)
- arising from a use of ‘fmapDefault’ at T10971a.hs:9:14-24
+ arising from a use of ‘fmapDefault’ at T10971a.hs:9:14-28
• In the expression: length x
In the expression: (fmapDefault f x, length x)
In the expression: \ f x -> (fmapDefault f x, length x)
diff --git a/testsuite/tests/typecheck/should_compile/T2494.stderr b/testsuite/tests/typecheck/should_compile/T2494.stderr
index 71351cba0a..b398459aa9 100644
--- a/testsuite/tests/typecheck/should_compile/T2494.stderr
+++ b/testsuite/tests/typecheck/should_compile/T2494.stderr
@@ -1,34 +1,36 @@
-T2494.hs:15:14:
- Couldn't match type ‘b’ with ‘a’
+T2494.hs:15:14: error:
+ • Couldn't match type ‘b’ with ‘a’
‘b’ is a rigid type variable bound by
- the RULE "foo/foo" at T2494.hs:14:16
+ the RULE "foo/foo" at T2494.hs:14:16
‘a’ is a rigid type variable bound by
- the RULE "foo/foo" at T2494.hs:13:16
- Expected type: Maybe (m a) -> Maybe (m a)
- Actual type: Maybe (m b) -> Maybe (m b)
- In the first argument of ‘foo’, namely ‘g’
- In the second argument of ‘foo’, namely ‘(foo g x)’
- Relevant bindings include
- f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a)
- (bound at T2494.hs:13:11)
- g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b)
- (bound at T2494.hs:14:11)
- x :: Maybe a (bound at T2494.hs:14:65)
+ the RULE "foo/foo" at T2494.hs:13:16
+ Expected type: Maybe (m a) -> Maybe (m a)
+ Actual type: Maybe (m b) -> Maybe (m b)
+ • In the first argument of ‘foo’, namely ‘g’
+ In the second argument of ‘foo’, namely ‘(foo g x)’
+ In the expression: foo f (foo g x)
+ • Relevant bindings include
+ f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a)
+ (bound at T2494.hs:13:11)
+ g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b)
+ (bound at T2494.hs:14:11)
+ x :: Maybe a (bound at T2494.hs:14:65)
-T2494.hs:15:30:
- Couldn't match type ‘b’ with ‘a’
+T2494.hs:15:30: error:
+ • Couldn't match type ‘b’ with ‘a’
‘b’ is a rigid type variable bound by
- the RULE "foo/foo" at T2494.hs:14:16
+ the RULE "foo/foo" at T2494.hs:14:16
‘a’ is a rigid type variable bound by
- the RULE "foo/foo" at T2494.hs:13:16
- Expected type: Maybe (m a) -> Maybe (m a)
- Actual type: Maybe (m b) -> Maybe (m b)
- In the second argument of ‘(.)’, namely ‘g’
- In the first argument of ‘foo’, namely ‘(f . g)’
- Relevant bindings include
- f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a)
- (bound at T2494.hs:13:11)
- g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b)
- (bound at T2494.hs:14:11)
- x :: Maybe a (bound at T2494.hs:14:65)
+ the RULE "foo/foo" at T2494.hs:13:16
+ Expected type: Maybe (m b) -> Maybe (m a)
+ Actual type: Maybe (m b) -> Maybe (m b)
+ • In the second argument of ‘(.)’, namely ‘g’
+ In the first argument of ‘foo’, namely ‘(f . g)’
+ In the expression: foo (f . g) x
+ • Relevant bindings include
+ f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a)
+ (bound at T2494.hs:13:11)
+ g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b)
+ (bound at T2494.hs:14:11)
+ x :: Maybe a (bound at T2494.hs:14:65)
diff --git a/testsuite/tests/typecheck/should_compile/Vta1.hs b/testsuite/tests/typecheck/should_compile/Vta1.hs
new file mode 100644
index 0000000000..c3ba43de54
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/Vta1.hs
@@ -0,0 +1,95 @@
+{-# LANGUAGE TypeApplications, ScopedTypeVariables, PolyKinds,
+ TypeFamilies, RankNTypes,
+ FlexibleContexts #-}
+-- tests about visible type application
+
+module Vta1 where
+
+quad :: a -> b -> c -> d -> (a, b, c, d)
+quad = (,,,)
+
+silly = quad @_ @Bool @Char @_ 5 True 'a' "Hello"
+
+pairup_nosig x y = (x, y)
+
+pairup_sig :: a -> b -> (a,b)
+pairup_sig u w = (u, w)
+
+answer_sig = pairup_sig @Bool @Int False 7 --
+-- (False, 7) :: (Bool, Int)
+
+answer_read = show (read @Int "3") -- "3" :: String
+answer_show = show @Integer (read "5") -- "5" :: String
+answer_showread = show @Int (read @Int "7") -- "7" :: String
+
+intcons a = (:) @Int a
+
+intpair x y = pairup_sig @Int x y
+
+answer_pairup = pairup_sig @Int 5 True -- (5, True) :: (Int, Bool)
+answer_intpair = intpair 1 "hello" -- (1, "hello") :: (Int, String)
+answer_intcons = intcons 7 [] -- [7] :: [Int]
+
+type family F a
+type instance F Char = Bool
+
+g :: F a -> a
+g _ = undefined
+
+f :: Char
+f = g True
+
+answer = g @Char False
+
+mapSame :: forall b. (forall a. a -> a) -> [b] -> [b]
+mapSame _ [] = []
+mapSame fun (x:xs) = fun @b x : (mapSame @b fun xs)
+
+pair :: forall a. a-> (forall b. b -> (a, b))
+pair x y = (x, y)
+
+b = pair @Int 3 @Bool True
+c = mapSame id [1,2,3]
+d = pair 3 @Bool True
+
+pairnum :: forall a. Num a => forall b. b -> (a, b)
+pairnum = pair 3
+
+e = (pair 3 :: forall a. Num a => forall b. b -> (a, b)) @Int @Bool True
+h = pairnum @Int @Bool True
+
+data First (a :: * -> *) = F
+data Proxy (a :: k) = P -- This expands to P (kind variable) (type variable)
+data Three (a :: * -> k -> *) = T
+
+foo :: Proxy a -> Int
+foo _ = 0
+
+first :: First a -> Int
+first _ = 0
+
+fTest = first F
+fMaybe = first @Maybe F
+
+test = foo P
+bar = foo @Bool P -- should work
+
+too :: Three a -> Int
+too _ = 3
+
+threeBase = too T
+threeOk = too @Either T
+
+blah = Nothing @Int
+
+newtype N = MkN { unMkN :: forall a. Show a => a -> String }
+
+n = MkN show
+
+boo = unMkN n @Bool
+
+boo2 :: forall (a :: * -> *) . Proxy a -> Bool
+boo2 _ = False
+
+base = boo2 P
+bar'= boo2 @Maybe P -- should work
diff --git a/testsuite/tests/typecheck/should_compile/Vta2.hs b/testsuite/tests/typecheck/should_compile/Vta2.hs
new file mode 100644
index 0000000000..2851b06469
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/Vta2.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE RankNTypes, TypeApplications #-}
+
+
+module Vta2 where
+
+checkIf :: Bool -> (forall a. a -> a) -> (Bool, Int)
+checkIf _ = if True
+ then \f -> (f True, f 5)
+ else \f -> (f False, f @Int 3)
+
+checkCase :: Bool -> (forall a. a -> a) -> (Bool, Int)
+checkCase _ = case True of
+ True -> \f -> (f True, f 5)
+ False -> \f -> (f False, f @Int 3)
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index a969a4c6ac..8002299fb1 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -471,6 +471,9 @@ test('T10428', normal, compile, [''])
test('RepArrow', normal, compile, [''])
test('T10562', normal, compile, [''])
test('T10564', normal, compile, [''])
+test('Vta1', normal, compile, [''])
+test('Vta2', normal, compile, [''])
+test('PushHRIf', normal, compile, [''])
test('T10632', normal, compile, [''])
test('T10642', normal, compile, [''])
test('T10744', normal, compile, [''])
diff --git a/testsuite/tests/typecheck/should_compile/holes.stderr b/testsuite/tests/typecheck/should_compile/holes.stderr
index 5cb341709e..8551f66c3b 100644
--- a/testsuite/tests/typecheck/should_compile/holes.stderr
+++ b/testsuite/tests/typecheck/should_compile/holes.stderr
@@ -1,33 +1,33 @@
-
-holes.hs:3:5: warning:
- Found hole: _ :: t
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of f :: t at holes.hs:3:1
- In the expression: _
- In an equation for ‘f’: f = _
- Relevant bindings include f :: t (bound at holes.hs:3:1)
-
-holes.hs:6:7: warning:
- Found hole: _ :: Char
- In the expression: _
- In an equation for ‘g’: g x = _
- Relevant bindings include
- x :: Int (bound at holes.hs:6:3)
- g :: Int -> Char (bound at holes.hs:6:1)
-
-holes.hs:8:5: warning:
- Found hole: _ :: [Char]
- In the first argument of ‘(++)’, namely ‘_’
- In the expression: _ ++ "a"
- In an equation for ‘h’: h = _ ++ "a"
- Relevant bindings include h :: [Char] (bound at holes.hs:8:1)
-
-holes.hs:11:15: warning:
- Found hole: _ :: b0
- Where: ‘b0’ is an ambiguous type variable
- In the second argument of ‘const’, namely ‘_’
- In the expression: const y _
- In an equation for ‘z’: z y = const y _
- Relevant bindings include
- y :: [a] (bound at holes.hs:11:3)
- z :: [a] -> [a] (bound at holes.hs:11:1)
+
+holes.hs:3:5: warning:
+ • Found hole: _ :: t
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of f :: t at holes.hs:3:1
+ • In the expression: _
+ In an equation for ‘f’: f = _
+ • Relevant bindings include f :: t (bound at holes.hs:3:1)
+
+holes.hs:6:7: warning:
+ • Found hole: _ :: Char
+ • In the expression: _
+ In an equation for ‘g’: g x = _
+ • Relevant bindings include
+ x :: Int (bound at holes.hs:6:3)
+ g :: Int -> Char (bound at holes.hs:6:1)
+
+holes.hs:8:5: warning:
+ • Found hole: _ :: [Char]
+ • In the first argument of ‘(++)’, namely ‘_’
+ In the expression: _ ++ "a"
+ In an equation for ‘h’: h = _ ++ "a"
+ • Relevant bindings include h :: [Char] (bound at holes.hs:8:1)
+
+holes.hs:11:15: warning:
+ • Found hole: _ :: b0
+ Where: ‘b0’ is an ambiguous type variable
+ • In the second argument of ‘const’, namely ‘_’
+ In the expression: const y _
+ In an equation for ‘z’: z y = const y _
+ • Relevant bindings include
+ y :: [a] (bound at holes.hs:11:3)
+ z :: [a] -> [a] (bound at holes.hs:11:1)
diff --git a/testsuite/tests/typecheck/should_compile/holes3.stderr b/testsuite/tests/typecheck/should_compile/holes3.stderr
index a6e7c6194e..2d1261b278 100644
--- a/testsuite/tests/typecheck/should_compile/holes3.stderr
+++ b/testsuite/tests/typecheck/should_compile/holes3.stderr
@@ -1,36 +1,36 @@
-
-holes3.hs:3:5: error:
- Found hole: _ :: t
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of f :: t at holes3.hs:3:1
- In the expression: _
- In an equation for ‘f’: f = _
- Relevant bindings include f :: t (bound at holes3.hs:3:1)
-
-holes3.hs:6:7: error:
- Found hole: _gr :: Char
- Or perhaps ‘_gr’ is mis-spelled, or not in scope
- In the expression: _gr
- In an equation for ‘g’: g x = _gr
- Relevant bindings include
- x :: Int (bound at holes3.hs:6:3)
- g :: Int -> Char (bound at holes3.hs:6:1)
-
-holes3.hs:8:5: error:
- Found hole: _aa :: [Char]
- Or perhaps ‘_aa’ is mis-spelled, or not in scope
- In the first argument of ‘(++)’, namely ‘_aa’
- In the expression: _aa ++ "a"
- In an equation for ‘h’: h = _aa ++ "a"
- Relevant bindings include h :: [Char] (bound at holes3.hs:8:1)
-
-holes3.hs:11:15: error:
- Found hole: _x :: b0
- Where: ‘b0’ is an ambiguous type variable
- Or perhaps ‘_x’ is mis-spelled, or not in scope
- In the second argument of ‘const’, namely ‘_x’
- In the expression: const y _x
- In an equation for ‘z’: z y = const y _x
- Relevant bindings include
- y :: [a] (bound at holes3.hs:11:3)
- z :: [a] -> [a] (bound at holes3.hs:11:1)
+
+holes3.hs:3:5: error:
+ • Found hole: _ :: t
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of f :: t at holes3.hs:3:1
+ • In the expression: _
+ In an equation for ‘f’: f = _
+ • Relevant bindings include f :: t (bound at holes3.hs:3:1)
+
+holes3.hs:6:7: error:
+ • Found hole: _gr :: Char
+ Or perhaps ‘_gr’ is mis-spelled, or not in scope
+ • In the expression: _gr
+ In an equation for ‘g’: g x = _gr
+ • Relevant bindings include
+ x :: Int (bound at holes3.hs:6:3)
+ g :: Int -> Char (bound at holes3.hs:6:1)
+
+holes3.hs:8:5: error:
+ • Found hole: _aa :: [Char]
+ Or perhaps ‘_aa’ is mis-spelled, or not in scope
+ • In the first argument of ‘(++)’, namely ‘_aa’
+ In the expression: _aa ++ "a"
+ In an equation for ‘h’: h = _aa ++ "a"
+ • Relevant bindings include h :: [Char] (bound at holes3.hs:8:1)
+
+holes3.hs:11:15: error:
+ • Found hole: _x :: b0
+ Where: ‘b0’ is an ambiguous type variable
+ Or perhaps ‘_x’ is mis-spelled, or not in scope
+ • In the second argument of ‘const’, namely ‘_x’
+ In the expression: const y _x
+ In an equation for ‘z’: z y = const y _x
+ • Relevant bindings include
+ y :: [a] (bound at holes3.hs:11:3)
+ z :: [a] -> [a] (bound at holes3.hs:11:1)
diff --git a/testsuite/tests/typecheck/should_compile/tc141.stderr b/testsuite/tests/typecheck/should_compile/tc141.stderr
index 96858b1d3c..e0de74c945 100644
--- a/testsuite/tests/typecheck/should_compile/tc141.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc141.stderr
@@ -7,19 +7,20 @@ tc141.hs:11:12: error:
In a pattern binding: (p :: a, q :: a) = x
tc141.hs:11:31: error:
- • Couldn't match expected type ‘a2’ with actual type ‘a’
- because type variable ‘a2’ would escape its scope
+ • 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
an expression type signature:
- a2
+ a1
at tc141.hs:11:31-34
• In the expression: q :: a
In the expression: (q :: a, p)
+ In the expression: let (p :: a, q :: a) = x in (q :: a, p)
• Relevant bindings include
p :: a (bound at tc141.hs:11:12)
q :: a (bound at tc141.hs:11:17)
x :: (a, a) (bound at tc141.hs:11:3)
- f :: (a, a) -> (a1, a) (bound at tc141.hs:11:1)
+ f :: (a, a) -> (t, a) (bound at tc141.hs:11:1)
tc141.hs:13:13: error:
• You cannot bind scoped type variable ‘a’
@@ -42,7 +43,12 @@ tc141.hs:15:18: error:
at tc141.hs:14:14-19
• In the expression: b
In an equation for ‘v’: v = b
+ In the expression:
+ let
+ v :: a
+ v = b
+ in v
• Relevant bindings include
v :: a1 (bound at tc141.hs:15:14)
b :: r1 (bound at tc141.hs:13:5)
- g :: r -> r1 -> a (bound at tc141.hs:13:1)
+ g :: r -> r1 -> forall a. a (bound at tc141.hs:13:1)
diff --git a/testsuite/tests/typecheck/should_compile/tc168.stderr b/testsuite/tests/typecheck/should_compile/tc168.stderr
index 7d992a48a0..16ba4b0446 100644
--- a/testsuite/tests/typecheck/should_compile/tc168.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc168.stderr
@@ -1,12 +1,12 @@
-
-tc168.hs:17:1: error:
- Could not deduce (C a1 (a, b0))
- 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
- In the ambiguity check for the inferred type for ‘g’
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- When checking the inferred type
- g :: forall a b a1. C a1 (a, b) => a1 -> a
+
+tc168.hs:17:1: error:
+ • Could not deduce (C a1 (a, b0))
+ 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
+ • In the ambiguity check for the inferred type for ‘g’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ When checking the inferred type
+ g :: forall a b a1. C a1 (a, b) => a1 -> a
diff --git a/testsuite/tests/typecheck/should_compile/tc211.stderr b/testsuite/tests/typecheck/should_compile/tc211.stderr
index d802dffe4e..89c82c4f9a 100644
--- a/testsuite/tests/typecheck/should_compile/tc211.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc211.stderr
@@ -1,61 +1,20 @@
-tc211.hs:17:8: error:
- Couldn't match expected type ‘forall a. a -> a’
- with actual type ‘a2 -> a2’
- In the expression:
- (:) ::
- (forall a. a -> a) -> [forall a. a -> a] -> [forall a. a -> a]
- In the expression:
- ((:) ::
- (forall a. a -> a) -> [forall a. a -> a] -> [forall a. a -> a])
- (head foo) foo
-
-tc211.hs:18:22: error:
- Couldn't match type ‘forall a3. a3 -> a3’ with ‘a -> a’
- Expected type: [a -> a]
- Actual type: [forall a. a -> a]
- In the first argument of ‘head’, namely ‘foo’
- In the first argument of ‘(:) ::
- (forall a. a -> a)
- -> [forall a. a -> a] -> [forall a. a -> a]’, namely
- ‘(head foo)’
-
-tc211.hs:59:18: error:
- Couldn't match expected type ‘forall a. a -> a’
- with actual type ‘a1 -> a1’
- In the expression:
- Cons ::
- (forall a. a -> a)
- -> List (forall a. a -> a) -> List (forall a. a -> a)
- In an equation for ‘cons’:
- cons
- = Cons ::
- (forall a. a -> a)
- -> List (forall a. a -> a) -> List (forall a. a -> a)
-
-tc211.hs:65:8: error:
- Couldn't match expected type ‘forall a. a -> a’
- with actual type ‘a0 -> a0’
- In the expression:
- Cons ::
- (forall a. a -> a)
- -> List (forall a. a -> a) -> List (forall a. a -> a)
- In the expression:
- (Cons ::
- (forall a. a -> a)
- -> List (forall a. a -> a) -> List (forall a. a -> a))
- (\ x -> x) Nil
-
tc211.hs:73:9: error:
- Couldn't match type ‘forall a4. a4 -> a4’ with ‘a3 -> a3’
- Expected type: List (forall a. a -> a)
- -> (forall a. a -> a) -> a3 -> a3
- Actual type: List (a3 -> a3) -> (a3 -> a3) -> a3 -> a3
- In the expression:
- foo2 ::
- List (forall a. a -> a) -> (forall a. a -> a) -> (forall a. a -> a)
- In the expression:
- (foo2 ::
- List (forall a. a -> a)
- -> (forall a. a -> a) -> (forall a. a -> a))
- xs1 (\ x -> x)
+ • Couldn't match type ‘forall a2. a2 -> a2’ with ‘a1 -> a1’
+ Expected type: List (forall a. a -> a)
+ -> (forall a. a -> a) -> a1 -> a1
+ Actual type: List (a1 -> a1) -> (a1 -> a1) -> a1 -> a1
+ • In the expression:
+ foo2 ::
+ List (forall a. a -> a) -> (forall a. a -> a) -> (forall a. a -> a)
+ In the expression:
+ (foo2 ::
+ List (forall a. a -> a)
+ -> (forall a. a -> a) -> (forall a. a -> a))
+ xs1 (\ x -> x)
+ In an equation for ‘bar4’:
+ bar4
+ = (foo2 ::
+ List (forall a. a -> a)
+ -> (forall a. a -> a) -> (forall a. a -> a))
+ xs1 (\ x -> x)
diff --git a/testsuite/tests/typecheck/should_compile/tc243.stderr b/testsuite/tests/typecheck/should_compile/tc243.stderr
index 98e0f5ae1e..0219817408 100644
--- a/testsuite/tests/typecheck/should_compile/tc243.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc243.stderr
@@ -1,3 +1,3 @@
-tc243.hs:10:1: Warning:
- Top-level binding with no type signature: (.+.) :: forall r. r
+tc243.hs:10:1: warning:
+ Top-level binding with no type signature: (.+.) :: forall a. a