diff options
Diffstat (limited to 'testsuite/tests/typecheck')
19 files changed, 58 insertions, 52 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T13651.stderr b/testsuite/tests/typecheck/should_compile/T13651.stderr index 99d57d1c96..72ed83da20 100644 --- a/testsuite/tests/typecheck/should_compile/T13651.stderr +++ b/testsuite/tests/typecheck/should_compile/T13651.stderr @@ -1,6 +1,6 @@ T13651.hs:12:8: error: - • Could not deduce: F cr (Bar h (Foo u)) ~ Bar h (Bar r u) + • Could not deduce (F cr (Bar h (Foo u)) ~ Bar h (Bar r u)) from the context: (F cr cu ~ Bar h (Bar r u), F cu cs ~ Bar (Foo h) (Bar u s)) bound by the type signature for: diff --git a/testsuite/tests/typecheck/should_compile/T9939.stderr b/testsuite/tests/typecheck/should_compile/T9939.stderr index 3067cddbf6..4d1af91a6c 100644 --- a/testsuite/tests/typecheck/should_compile/T9939.stderr +++ b/testsuite/tests/typecheck/should_compile/T9939.stderr @@ -1,20 +1,20 @@ T9939.hs:6:7: warning: [-Wredundant-constraints] - • Redundant constraint: Eq a - • In the type signature for: - f1 :: forall a. (Eq a, Ord a) => a -> a -> Bool + Redundant constraint: Eq a + In the type signature for: + f1 :: forall a. (Eq a, Ord a) => a -> a -> Bool T9939.hs:10:7: warning: [-Wredundant-constraints] - • Redundant constraint: Ord a - • In the type signature for: - f2 :: forall a. (Eq a, Ord a) => a -> a -> Bool + Redundant constraint: Ord a + In the type signature for: + f2 :: forall a. (Eq a, Ord a) => a -> a -> Bool T9939.hs:14:7: warning: [-Wredundant-constraints] - • Redundant constraint: Eq b - • In the type signature for: - f3 :: forall a b. (Eq a, a ~ b, Eq b) => a -> b -> Bool + Redundant constraint: Eq b + In the type signature for: + f3 :: forall a b. (Eq a, a ~ b, Eq b) => a -> b -> Bool T9939.hs:21:7: warning: [-Wredundant-constraints] - • Redundant constraint: Eq b - • In the type signature for: - f4 :: forall a b. (Eq a, Eq b) => a -> b -> Equal a b -> Bool + Redundant constraint: Eq b + In the type signature for: + f4 :: forall a b. (Eq a, Eq b) => a -> b -> Equal a b -> Bool diff --git a/testsuite/tests/typecheck/should_compile/tc214.stderr b/testsuite/tests/typecheck/should_compile/tc214.stderr index ea5cc8d93c..de6b340e4b 100644 --- a/testsuite/tests/typecheck/should_compile/tc214.stderr +++ b/testsuite/tests/typecheck/should_compile/tc214.stderr @@ -4,15 +4,15 @@ tc214.hs:19:1: warning: [-Woverlapping-patterns (in -Wdefault)] In an equation for ‘bar2’: bar2 (F2 _) = ... tc214.hs:19:7: warning: [-Winaccessible-code (in -Wdefault)] - • Couldn't match type ‘a’ with ‘forall a1. a1’ + • Inaccessible code in + a pattern with constructor: F2 :: forall a. a -> Foo2 [a], + in an equation for ‘bar2’ + Couldn't match type ‘a’ with ‘forall a1. a1’ Cannot equate type variable ‘a’ with a type involving polytypes: forall a1. a1 ‘a’ is a rigid type variable bound by a pattern with constructor: F2 :: forall a. a -> Foo2 [a], in an equation for ‘bar2’ at tc214.hs:19:7-10 - Inaccessible code in - a pattern with constructor: F2 :: forall a. a -> Foo2 [a], - in an equation for ‘bar2’ • In the pattern: F2 _ In an equation for ‘bar2’: bar2 (F2 _) = () diff --git a/testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr index bc12dfa2ba..1c105ae30c 100644 --- a/testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr +++ b/testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr @@ -2,12 +2,14 @@ [2 of 2] Compiling Foo ( valid_hole_fits.hs, valid_hole_fits.o ) valid_hole_fits.hs:9:6: warning: [-Wdeferred-out-of-scope-variables (in -Wdefault)] - • Variable not in scope: putStrLn :: String -> IO () - • Perhaps you meant one of these: - ‘System.IO.putStrLn’ (imported from System.IO), - ‘System.IO.putStr’ (imported from System.IO) - Perhaps you want to remove ‘putStrLn’ from the explicit hiding list - in the import of ‘Prelude’ (valid_hole_fits.hs:3:1-40). + Variable not in scope: putStrLn :: String -> IO () + Suggested fixes: + • Perhaps use one of these: + ‘System.IO.putStrLn’ (imported from System.IO), + ‘System.IO.putStr’ (imported from System.IO) + • Perhaps you want to remove ‘putStrLn’ + from the explicit hiding list in the import of ‘Prelude’ + (valid_hole_fits.hs:3:1-40). valid_hole_fits.hs:17:17: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _ :: Int -> IO Int diff --git a/testsuite/tests/typecheck/should_fail/GivenForallLoop.stderr b/testsuite/tests/typecheck/should_fail/GivenForallLoop.stderr index e4260e62ed..4d759155cc 100644 --- a/testsuite/tests/typecheck/should_fail/GivenForallLoop.stderr +++ b/testsuite/tests/typecheck/should_fail/GivenForallLoop.stderr @@ -1,6 +1,6 @@ GivenForallLoop.hs:8:11: error: - • Could not deduce: a ~ b + • Could not deduce (a ~ b) from the context: a ~ (forall b1. F a b1) bound by the type signature for: loopy :: forall a b. (a ~ (forall b1. F a b1)) => a -> b diff --git a/testsuite/tests/typecheck/should_fail/T10285.stderr b/testsuite/tests/typecheck/should_fail/T10285.stderr index 02215e2f70..c259a8e3e2 100644 --- a/testsuite/tests/typecheck/should_fail/T10285.stderr +++ b/testsuite/tests/typecheck/should_fail/T10285.stderr @@ -1,6 +1,6 @@ T10285.hs:8:17: error: - • Could not deduce: Coercible a b arising from a use of ‘coerce’ + • Could not deduce (Coercible a b) arising from a use of ‘coerce’ from the context: Coercible (N a) (N b) bound by a pattern with constructor: Coercion :: forall {k} (a :: k) (b :: k). diff --git a/testsuite/tests/typecheck/should_fail/T10534.stderr b/testsuite/tests/typecheck/should_fail/T10534.stderr index 86020af877..a8888ba5be 100644 --- a/testsuite/tests/typecheck/should_fail/T10534.stderr +++ b/testsuite/tests/typecheck/should_fail/T10534.stderr @@ -1,6 +1,6 @@ T10534a.hs:10:9: error: - • Could not deduce: Coercible a b arising from a use of ‘coerce’ + • Could not deduce (Coercible a b) arising from a use of ‘coerce’ from the context: Coercible (DF a) (DF b) bound by the type signature for: silly :: forall a b. Coercible (DF a) (DF b) => a -> b diff --git a/testsuite/tests/typecheck/should_fail/T12178a.stderr b/testsuite/tests/typecheck/should_fail/T12178a.stderr index ef9f66a526..46fb5a6614 100644 --- a/testsuite/tests/typecheck/should_fail/T12178a.stderr +++ b/testsuite/tests/typecheck/should_fail/T12178a.stderr @@ -1,4 +1,5 @@ T12178a.hs:7:12: error: The INLINE pragma for ‘C’ lacks an accompanying binding - (The INLINE pragma must be given where ‘C’ is declared) + Suggested fix: + Move the INLINE pragma to the declaration site of ‘C’. diff --git a/testsuite/tests/typecheck/should_fail/T12785b.stderr b/testsuite/tests/typecheck/should_fail/T12785b.stderr index 14ce110c0d..cd2c75b2c1 100644 --- a/testsuite/tests/typecheck/should_fail/T12785b.stderr +++ b/testsuite/tests/typecheck/should_fail/T12785b.stderr @@ -1,6 +1,6 @@ T12785b.hs:30:65: error: - • Could not deduce: Payload ('S n) (Payload n s1) ~ s + • Could not deduce (Payload ('S n) (Payload n s1) ~ s) arising from a use of ‘SBranchX’ from the context: m ~ 'S n bound by a pattern with constructor: diff --git a/testsuite/tests/typecheck/should_fail/T13640.stderr b/testsuite/tests/typecheck/should_fail/T13640.stderr index d926dd9241..28afc7d55e 100644 --- a/testsuite/tests/typecheck/should_fail/T13640.stderr +++ b/testsuite/tests/typecheck/should_fail/T13640.stderr @@ -1,8 +1,9 @@ T13640.hs:13:22: error: - • Variable not in scope: - (.) - :: (f0 a c0 -> f0 b c0) - -> ((a0 -> b0) -> f1 a0 -> f1 b0) -> f a c -> f b d - • Perhaps you want to remove ‘.’ from the explicit hiding list + Variable not in scope: + (.) + :: (f0 a c0 -> f0 b c0) + -> ((a0 -> b0) -> f1 a0 -> f1 b0) -> f a c -> f b d + Suggested fix: + Perhaps you want to remove ‘.’ from the explicit hiding list in the import of ‘Prelude’ (T13640.hs:4:1-27). diff --git a/testsuite/tests/typecheck/should_fail/T15361.stderr b/testsuite/tests/typecheck/should_fail/T15361.stderr index 1520bc3982..b4692064f3 100644 --- a/testsuite/tests/typecheck/should_fail/T15361.stderr +++ b/testsuite/tests/typecheck/should_fail/T15361.stderr @@ -1,6 +1,6 @@ T15361.hs:13:13: error: - • Could not deduce: a ~ c + • Could not deduce (a ~ c) from the context: b ~ a bound by a pattern with constructor: HRefl :: forall {k1} (a :: k1). a :~~: a, diff --git a/testsuite/tests/typecheck/should_fail/T19978.stderr b/testsuite/tests/typecheck/should_fail/T19978.stderr index 4ea25fcf04..68796e058a 100644 --- a/testsuite/tests/typecheck/should_fail/T19978.stderr +++ b/testsuite/tests/typecheck/should_fail/T19978.stderr @@ -3,19 +3,19 @@ T19978.hs:8:7: error: • Illegal term-level use of the type constructor or class ‘Bool’ • imported from ‘Prelude’ at T19978.hs:3:8-13 (and originally defined in ‘GHC.Types’) - • Perhaps you meant one of these: + • Perhaps use one of these: ‘Bowl’ (line 11), variable ‘bool’ (line 12) • In the expression: Bool In an equation for ‘ex1’: ex1 = Bool T19978.hs:14:7: error: - • Data constructor not in scope: Let - • Perhaps you meant ‘Left’ (imported from Prelude) + Data constructor not in scope: Let + Suggested fix: Perhaps use ‘Left’ (imported from Prelude) T19978.hs:21:7: error: • Illegal term-level use of the type variable ‘mytv’ • bound at T19978.hs:20:15 - • Perhaps you meant one of these: + • Perhaps use one of these: data constructor ‘Mytv’ (line 24), ‘myvv’ (line 25) • In the expression: mytv In an equation for ‘ex3’: ex3 = mytv diff --git a/testsuite/tests/typecheck/should_fail/T5853.stderr b/testsuite/tests/typecheck/should_fail/T5853.stderr index b25e1fca91..1cb76d317f 100644 --- a/testsuite/tests/typecheck/should_fail/T5853.stderr +++ b/testsuite/tests/typecheck/should_fail/T5853.stderr @@ -1,6 +1,6 @@ T5853.hs:15:52: error: - • Could not deduce: Subst fa1 (Elem fb) ~ fb + • Could not deduce (Subst fa1 (Elem fb) ~ fb) arising from a use of ‘<$>’ from the context: (F fa, Elem fb ~ Elem fb, Subst fa (Elem fb) ~ fb, Subst fb (Elem fa) ~ fa, F fa1, diff --git a/testsuite/tests/typecheck/should_fail/T7525.stderr b/testsuite/tests/typecheck/should_fail/T7525.stderr index 11028ef3bd..86fc55e198 100644 --- a/testsuite/tests/typecheck/should_fail/T7525.stderr +++ b/testsuite/tests/typecheck/should_fail/T7525.stderr @@ -1,6 +1,6 @@ T7525.hs:5:30: error: - • Could not deduce: ?b::Bool + • Could not deduce (?b::Bool) arising from a use of implicit parameter ‘?b’ from the context: ?a::Bool bound by the implicit-parameter binding for ?a at T7525.hs:5:7-31 diff --git a/testsuite/tests/typecheck/should_fail/T9109.stderr b/testsuite/tests/typecheck/should_fail/T9109.stderr index 6a4d4988de..223be12e8b 100644 --- a/testsuite/tests/typecheck/should_fail/T9109.stderr +++ b/testsuite/tests/typecheck/should_fail/T9109.stderr @@ -1,6 +1,6 @@ T9109.hs:8:13: error: - • Could not deduce: p ~ Bool + • Could not deduce (p ~ Bool) from the context: a ~ Bool bound by a pattern with constructor: GBool :: G Bool, in an equation for ‘foo’ @@ -8,7 +8,7 @@ T9109.hs:8:13: error: ‘p’ is a rigid type variable bound by the inferred type of foo :: G a -> p at T9109.hs:8:1-16 - Possible fix: add a type signature for ‘foo’ • In the expression: True In an equation for ‘foo’: foo GBool = True • Relevant bindings include foo :: G a -> p (bound at T9109.hs:8:1) + Suggested fix: Consider giving ‘foo’ a type signature diff --git a/testsuite/tests/typecheck/should_fail/tcfail046.stderr b/testsuite/tests/typecheck/should_fail/tcfail046.stderr index 967b5a0fe6..6ee553f689 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail046.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail046.stderr @@ -11,10 +11,10 @@ tcfail046.hs:10:50: error: tcfail046.hs:22:25: error: • Could not deduce (Eq (Process a)) arising from the first field of ‘Create’ (type ‘Process a’) - (maybe you haven't applied a function to enough arguments?) from the context: Eq a bound by the deriving clause for ‘Eq (Message a)’ at tcfail046.hs:22:25-26 + (maybe you haven't applied a function to enough arguments?) Possible fix: use a standalone 'deriving instance' declaration, so you can specify the instance context yourself diff --git a/testsuite/tests/typecheck/should_fail/tcfail062.stderr b/testsuite/tests/typecheck/should_fail/tcfail062.stderr index ff4915dfd2..197bdb30f0 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail062.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail062.stderr @@ -1,8 +1,10 @@ -tcfail062.hs:34:6: +tcfail062.hs:34:6: error: Not in scope: type variable ‘behaviouralExpression’ - Perhaps you meant type constructor or class ‘BehaviouralExpression’ (line 25) + Suggested fix: + Perhaps use type constructor or class ‘BehaviouralExpression’ (line 25) -tcfail062.hs:34:29: +tcfail062.hs:34:29: error: Not in scope: type variable ‘behaviouralExpression’ - Perhaps you meant type constructor or class ‘BehaviouralExpression’ (line 25) + Suggested fix: + Perhaps use type constructor or class ‘BehaviouralExpression’ (line 25) diff --git a/testsuite/tests/typecheck/should_fail/tcfail167.stderr b/testsuite/tests/typecheck/should_fail/tcfail167.stderr index 8ca5dc9b80..6346257e09 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail167.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail167.stderr @@ -4,9 +4,9 @@ tcfail167.hs:14:1: error: [-Woverlapping-patterns (in -Wdefault), -Werror=overla In an equation for ‘inaccessible’: inaccessible C2 = ... tcfail167.hs:14:14: error: [-Winaccessible-code (in -Wdefault), -Werror=inaccessible-code] - • Couldn't match type ‘Char’ with ‘Float’ - Inaccessible code in + • Inaccessible code in a pattern with constructor: C2 :: T Float, in an equation for ‘inaccessible’ + Couldn't match type ‘Char’ with ‘Float’ • In the pattern: C2 In an equation for ‘inaccessible’: inaccessible C2 = ' ' diff --git a/testsuite/tests/typecheck/should_run/Typeable1.stderr b/testsuite/tests/typecheck/should_run/Typeable1.stderr index 3ded9c03ed..d2488bb575 100644 --- a/testsuite/tests/typecheck/should_run/Typeable1.stderr +++ b/testsuite/tests/typecheck/should_run/Typeable1.stderr @@ -1,8 +1,6 @@ Typeable1.hs:22:5: error: [-Winaccessible-code (in -Wdefault), -Werror=inaccessible-code] - • Couldn't match type: ComposeK - with: a3 b3 - Inaccessible code in + • Inaccessible code in a pattern with pattern synonym: App :: forall k2 (t :: k2). () => @@ -11,6 +9,8 @@ Typeable1.hs:22:5: error: [-Winaccessible-code (in -Wdefault), -Werror=inaccessi TypeRep a -> TypeRep b -> TypeRep t, in a pattern binding in a 'do' block + Couldn't match type: ComposeK + with: a3 b3 • In the pattern: App x y In a stmt of a 'do' block: App x y <- pure x In the expression: |