diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_fail')
10 files changed, 59 insertions, 49 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T10619.stderr b/testsuite/tests/typecheck/should_fail/T10619.stderr index c26e550f17..6f584b90db 100644 --- a/testsuite/tests/typecheck/should_fail/T10619.stderr +++ b/testsuite/tests/typecheck/should_fail/T10619.stderr @@ -19,11 +19,13 @@ T10619.hs:10:14: error: \ y -> y T10619.hs:14:15: error: - • Couldn't match type ‘p’ with ‘forall a. a -> a’ - Expected: p -> p + • Couldn't match type ‘p2’ with ‘forall a. a -> a’ + Expected: p2 -> p2 Actual: (forall a. a -> a) -> forall b. b -> b - ‘p’ is a rigid type variable bound by - the inferred type of bar :: p2 -> p -> p + Cannot equate type variable ‘p2’ + with a type involving polytypes: forall a. a -> a + ‘p2’ is a rigid type variable bound by + the inferred type of bar :: p -> p2 -> p2 at T10619.hs:(12,1)-(14,66) • In the expression: (\ x -> x) :: (forall a. a -> a) -> forall b. b -> b @@ -39,7 +41,7 @@ T10619.hs:14:15: error: else ((\ x -> x) :: (forall a. a -> a) -> forall b. b -> b) • Relevant bindings include - bar :: p2 -> p -> p (bound at T10619.hs:12:1) + bar :: p -> p2 -> p2 (bound at T10619.hs:12:1) T10619.hs:17:13: error: • Couldn't match type ‘p0’ with ‘forall a. a -> a’ @@ -54,6 +56,8 @@ T10619.hs:20:14: error: • Couldn't match type ‘p’ with ‘forall a. a -> a’ Expected: p -> p Actual: (forall a. a -> a) -> forall b. b -> b + Cannot equate type variable ‘p’ + with a type involving polytypes: forall a. a -> a ‘p’ is a rigid type variable bound by the inferred type of quux :: Bool -> p -> p at T10619.hs:(19,1)-(20,64) diff --git a/testsuite/tests/typecheck/should_fail/T10709.stderr b/testsuite/tests/typecheck/should_fail/T10709.stderr index 16429ea467..aa4d505bfc 100644 --- a/testsuite/tests/typecheck/should_fail/T10709.stderr +++ b/testsuite/tests/typecheck/should_fail/T10709.stderr @@ -1,34 +1,43 @@ T10709.hs:6:21: error: - • Couldn't match type ‘a4’ with ‘(forall a. IO a -> IO a) -> IO a5’ - Expected: a4 -> IO a5 - Actual: ((forall a. IO a -> IO a) -> IO a5) -> IO a5 - Cannot instantiate unification variable ‘a4’ - with a type involving polytypes: (forall a. IO a -> IO a) -> IO a5 + • Couldn't match type ‘a’ + with ‘(forall a3. IO a3 -> IO a3) -> IO a2’ + Expected: a -> IO a2 + Actual: ((forall a. IO a -> IO a) -> IO a2) -> IO a2 + Cannot equate type variable ‘a’ + with a type involving polytypes: + (forall a3. IO a3 -> IO a3) -> IO a2 + ‘a’ is a rigid type variable bound by + the inferred type of x1 :: a -> IO [a2] + at T10709.hs:6:1-24 • In the second argument of ‘(.)’, namely ‘mask’ In the expression: replicateM 2 . mask In an equation for ‘x1’: x1 = replicateM 2 . mask • Relevant bindings include - x1 :: a4 -> IO [a5] (bound at T10709.hs:6:1) + x1 :: a -> IO [a2] (bound at T10709.hs:6:1) T10709.hs:7:22: error: - • Couldn't match type ‘a2’ with ‘(forall a. IO a -> IO a) -> IO a3’ - Expected: a2 -> IO a3 - Actual: ((forall a. IO a -> IO a) -> IO a3) -> IO a3 - Cannot instantiate unification variable ‘a2’ - with a type involving polytypes: (forall a. IO a -> IO a) -> IO a3 + • Couldn't match type ‘a1’ + with ‘(forall a2. IO a2 -> IO a2) -> IO a’ + Expected: a1 -> IO a + Actual: ((forall a1. IO a1 -> IO a1) -> IO a) -> IO a + Cannot instantiate unification variable ‘a1’ + with a type involving polytypes: + (forall a2. IO a2 -> IO a2) -> IO a • In the second argument of ‘(.)’, namely ‘mask’ In the expression: (replicateM 2 . mask) undefined In an equation for ‘x2’: x2 = (replicateM 2 . mask) undefined - • Relevant bindings include x2 :: IO [a3] (bound at T10709.hs:7:1) + • Relevant bindings include x2 :: IO [a] (bound at T10709.hs:7:1) T10709.hs:8:22: error: - • Couldn't match type ‘a0’ with ‘(forall a. IO a -> IO a) -> IO a1’ - Expected: a0 -> IO a1 - Actual: ((forall a. IO a -> IO a) -> IO a1) -> IO a1 + • Couldn't match type ‘a0’ + with ‘(forall a2. IO a2 -> IO a2) -> IO a’ + Expected: a0 -> IO a + Actual: ((forall a1. IO a1 -> IO a1) -> IO a) -> IO a Cannot instantiate unification variable ‘a0’ - with a type involving polytypes: (forall a. IO a -> IO a) -> IO a1 + with a type involving polytypes: + (forall a2. IO a2 -> IO a2) -> IO a • In the second argument of ‘(.)’, namely ‘mask’ In the first argument of ‘($)’, namely ‘(replicateM 2 . mask)’ In the expression: (replicateM 2 . mask) $ undefined - • Relevant bindings include x3 :: IO [a1] (bound at T10709.hs:8:1) + • Relevant bindings include x3 :: IO [a] (bound at T10709.hs:8:1) diff --git a/testsuite/tests/typecheck/should_fail/T10715b.stderr b/testsuite/tests/typecheck/should_fail/T10715b.stderr index 99875bbcf5..6eb2f698bd 100644 --- a/testsuite/tests/typecheck/should_fail/T10715b.stderr +++ b/testsuite/tests/typecheck/should_fail/T10715b.stderr @@ -1,12 +1,9 @@ T10715b.hs:7:7: error: - • Couldn't match representation of type ‘b’ with that of ‘[b]’ + • Couldn't match representation of type ‘b0’ with that of ‘[b0]’ arising from a use of ‘coerce’ - ‘b’ is a rigid type variable bound by - the inferred type of foo :: [b] -> b - at T10715b.hs:7:1-28 • In the first argument of ‘asTypeOf’, namely ‘coerce’ In the expression: coerce `asTypeOf` head In an equation for ‘foo’: foo = coerce `asTypeOf` head • Relevant bindings include - foo :: [b] -> b (bound at T10715b.hs:7:1) + foo :: [b0] -> b0 (bound at T10715b.hs:7:1) diff --git a/testsuite/tests/typecheck/should_fail/T12563.stderr b/testsuite/tests/typecheck/should_fail/T12563.stderr index c5b8e1dc40..4b64ef1cc7 100644 --- a/testsuite/tests/typecheck/should_fail/T12563.stderr +++ b/testsuite/tests/typecheck/should_fail/T12563.stderr @@ -1,12 +1,15 @@ T12563.hs:8:15: error: - • Couldn't match expected type ‘(forall a. f0 a) -> f0 r0’ - with actual type ‘p0’ - Cannot instantiate unification variable ‘p0’ - with a type involving polytypes: (forall a. f0 a) -> f0 r0 + • Couldn't match expected type ‘(forall a. f a) -> f r’ + with actual type ‘p’ + Cannot equate type variable ‘p’ + with a type involving polytypes: (forall a. f a) -> f r + ‘p’ is a rigid type variable bound by + the inferred type of x :: p -> f r + at T12563.hs:8:1-15 • In the first argument of ‘foo’, namely ‘g’ In the expression: foo g In the expression: \ g -> foo g • Relevant bindings include - g :: p0 (bound at T12563.hs:8:6) - x :: p0 -> f0 r0 (bound at T12563.hs:8:1) + g :: p (bound at T12563.hs:8:6) + x :: p -> f r (bound at T12563.hs:8:1) diff --git a/testsuite/tests/typecheck/should_fail/T13909.stderr b/testsuite/tests/typecheck/should_fail/T13909.stderr index 6ea5b32e66..d370d9ed05 100644 --- a/testsuite/tests/typecheck/should_fail/T13909.stderr +++ b/testsuite/tests/typecheck/should_fail/T13909.stderr @@ -2,6 +2,8 @@ T13909.hs:11:18: error: • Expecting two more arguments to ‘Hm’ Expected kind ‘k’, but ‘Hm’ has kind ‘forall k -> k -> *’ + Cannot equate type variable ‘k’ + with a kind involving polytypes: forall k1 -> k1 -> * ‘k’ is a rigid type variable bound by an instance declaration at T13909.hs:11:10-19 diff --git a/testsuite/tests/typecheck/should_fail/T14618.stderr b/testsuite/tests/typecheck/should_fail/T14618.stderr index c6fae3f81e..05a763048e 100644 --- a/testsuite/tests/typecheck/should_fail/T14618.stderr +++ b/testsuite/tests/typecheck/should_fail/T14618.stderr @@ -3,6 +3,8 @@ T14618.hs:7:14: error: • Couldn't match type ‘b’ with ‘forall c. a’ Expected: a -> b Actual: a -> forall c. a + Cannot equate type variable ‘b’ + with a type involving polytypes: forall c. a ‘b’ is a rigid type variable bound by the type signature for: safeCoerce :: forall a b. a -> b diff --git a/testsuite/tests/typecheck/should_fail/T14904a.stderr b/testsuite/tests/typecheck/should_fail/T14904a.stderr index 1ed0946f6c..0de9206867 100644 --- a/testsuite/tests/typecheck/should_fail/T14904a.stderr +++ b/testsuite/tests/typecheck/should_fail/T14904a.stderr @@ -1,6 +1,8 @@ T14904a.hs:10:6: error: • Expected kind ‘forall (a :: k). g a’, but ‘f’ has kind ‘k1’ + Cannot equate type variable ‘k1’ + with a kind involving polytypes: forall (a :: k). g a ‘k1’ is a rigid type variable bound by a family instance declaration at T14904a.hs:10:3-30 diff --git a/testsuite/tests/typecheck/should_fail/T3592.stderr b/testsuite/tests/typecheck/should_fail/T3592.stderr index bc3f774ecc..458922cb91 100644 --- a/testsuite/tests/typecheck/should_fail/T3592.stderr +++ b/testsuite/tests/typecheck/should_fail/T3592.stderr @@ -9,12 +9,3 @@ T3592.hs:8:5: error: In an equation for ‘f’: f = show • Relevant bindings include f :: T a -> String (bound at T3592.hs:8:1) - -T3592.hs:11:7: error: - • No instance for (Show a) arising from a use of ‘show’ - Possible fix: - add (Show a) to the context of - the type signature for: - g :: forall a. T a -> String - • In the expression: show x - In an equation for ‘g’: g x = show x diff --git a/testsuite/tests/typecheck/should_fail/T7264.stderr b/testsuite/tests/typecheck/should_fail/T7264.stderr index 4d2a153306..0f18dd41af 100644 --- a/testsuite/tests/typecheck/should_fail/T7264.stderr +++ b/testsuite/tests/typecheck/should_fail/T7264.stderr @@ -3,6 +3,8 @@ T7264.hs:13:19: error: • Couldn't match type ‘a’ with ‘forall r. r -> String’ Expected: a -> Foo Actual: (forall r. r -> String) -> Foo + Cannot equate type variable ‘a’ + with a type involving polytypes: forall r. r -> String ‘a’ is a rigid type variable bound by the inferred type of mkFoo2 :: a -> Maybe Foo at T7264.hs:13:1-32 diff --git a/testsuite/tests/typecheck/should_fail/T8142.stderr b/testsuite/tests/typecheck/should_fail/T8142.stderr index a362d35367..2c970aca2e 100644 --- a/testsuite/tests/typecheck/should_fail/T8142.stderr +++ b/testsuite/tests/typecheck/should_fail/T8142.stderr @@ -12,17 +12,15 @@ T8142.hs:6:10: error: where h = (\ (_, b) -> ((outI . fmap h) b)) . out • Relevant bindings include - h :: Nu ((,) a0) -> Nu f0 (bound at T8142.hs:6:18) tracer :: (c -> f c) -> c -> f c (bound at T8142.hs:6:1) T8142.hs:6:57: error: - • Couldn't match type: Nu ((,) a0) - with: f0 (Nu ((,) a0)) - Expected: Nu ((,) a0) -> (a0, f0 (Nu ((,) a0))) - Actual: Nu ((,) a0) -> (a0, Nu ((,) a0)) - The type variables ‘f0’, ‘a0’ are ambiguous + • Couldn't match type: Nu ((,) a) + with: f1 (Nu ((,) a)) + Expected: Nu ((,) a) -> (a, f1 (Nu ((,) a))) + Actual: Nu ((,) a) -> (a, Nu ((,) a)) • In the second argument of ‘(.)’, namely ‘out’ In the expression: (\ (_, b) -> ((outI . fmap h) b)) . out In an equation for ‘h’: h = (\ (_, b) -> ((outI . fmap h) b)) . out • Relevant bindings include - h :: Nu ((,) a0) -> Nu f0 (bound at T8142.hs:6:18) + h :: Nu ((,) a) -> Nu f1 (bound at T8142.hs:6:18) |