diff options
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/indexed-types/should_fail/NotRelaxedExamples.stderr | 35 | ||||
-rw-r--r-- | testsuite/tests/indexed-types/should_fail/TyFamUndec.stderr | 35 | ||||
-rw-r--r-- | testsuite/tests/module/all.T | 2 | ||||
-rw-r--r-- | testsuite/tests/module/mod89.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/module/mod89.stderr | 12 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T9858a.stderr | 28 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/fd-loop.stderr | 24 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail108.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail154.stderr | 12 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail157.stderr | 24 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail213.stderr | 14 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail214.stderr | 12 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail220.hsig | 1 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail220.stderr | 26 |
14 files changed, 114 insertions, 117 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/NotRelaxedExamples.stderr b/testsuite/tests/indexed-types/should_fail/NotRelaxedExamples.stderr index dd479b7664..1594d199df 100644 --- a/testsuite/tests/indexed-types/should_fail/NotRelaxedExamples.stderr +++ b/testsuite/tests/indexed-types/should_fail/NotRelaxedExamples.stderr @@ -1,18 +1,17 @@ - -NotRelaxedExamples.hs:9:15: - Nested type family application - in the type family application: F1 (F1 Char) - (Use UndecidableInstances to permit this) - In the type instance declaration for ‘F1’ - -NotRelaxedExamples.hs:10:15: - Application is no smaller than the instance head - in the type family application: F2 [x] - (Use UndecidableInstances to permit this) - In the type instance declaration for ‘F2’ - -NotRelaxedExamples.hs:11:15: - Application is no smaller than the instance head - in the type family application: F3 [Char] - (Use UndecidableInstances to permit this) - In the type instance declaration for ‘F3’ +
+NotRelaxedExamples.hs:9:15: error:
+ Illegal nested type family application ‘F1 (F1 Char)’
+ (Use UndecidableInstances to permit this)
+ In the type instance declaration for ‘F1’
+
+NotRelaxedExamples.hs:10:15: error:
+ The type family application ‘F2 [x]’
+ is no smaller than the instance head
+ (Use UndecidableInstances to permit this)
+ In the type instance declaration for ‘F2’
+
+NotRelaxedExamples.hs:11:15: error:
+ The type family application ‘F3 [Char]’
+ is no smaller than the instance head
+ (Use UndecidableInstances to permit this)
+ In the type instance declaration for ‘F3’
diff --git a/testsuite/tests/indexed-types/should_fail/TyFamUndec.stderr b/testsuite/tests/indexed-types/should_fail/TyFamUndec.stderr index 15cd757181..bdc9c5fbac 100644 --- a/testsuite/tests/indexed-types/should_fail/TyFamUndec.stderr +++ b/testsuite/tests/indexed-types/should_fail/TyFamUndec.stderr @@ -1,18 +1,17 @@ - -TyFamUndec.hs:6:15: - Variable ‘b’ occurs more often than in the instance head - in the type family application: T (b, b) - (Use UndecidableInstances to permit this) - In the type instance declaration for ‘T’ - -TyFamUndec.hs:7:15: - Application is no smaller than the instance head - in the type family application: T (a, Maybe b) - (Use UndecidableInstances to permit this) - In the type instance declaration for ‘T’ - -TyFamUndec.hs:8:15: - Nested type family application - in the type family application: T (a, T b) - (Use UndecidableInstances to permit this) - In the type instance declaration for ‘T’ +
+TyFamUndec.hs:6:15: error:
+ Variable ‘b’ occurs more often
+ in the type family application ‘T (b, b)’ than in the instance head
+ (Use UndecidableInstances to permit this)
+ In the type instance declaration for ‘T’
+
+TyFamUndec.hs:7:15: error:
+ The type family application ‘T (a, Maybe b)’
+ is no smaller than the instance head
+ (Use UndecidableInstances to permit this)
+ In the type instance declaration for ‘T’
+
+TyFamUndec.hs:8:15: error:
+ Illegal nested type family application ‘T (a, T b)’
+ (Use UndecidableInstances to permit this)
+ In the type instance declaration for ‘T’
diff --git a/testsuite/tests/module/all.T b/testsuite/tests/module/all.T index c4c2fffe57..d0b37aaa33 100644 --- a/testsuite/tests/module/all.T +++ b/testsuite/tests/module/all.T @@ -116,7 +116,7 @@ test('mod85', normal, compile, ['']) test('mod86', normal, compile, ['']) test('mod87', normal, compile_fail, ['']) test('mod88', normal, compile_fail, ['']) -test('mod89', normal, compile_fail, ['']) +test('mod89', normal, compile, ['']) test('mod90', normal, compile_fail, ['']) test('mod91', normal, compile_fail, ['']) test('mod92', normal, compile, ['']) diff --git a/testsuite/tests/module/mod89.hs b/testsuite/tests/module/mod89.hs index 2c48d65a16..1e903a0125 100644 --- a/testsuite/tests/module/mod89.hs +++ b/testsuite/tests/module/mod89.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -Wall #-} + -- !!! Sublist for non-class/tycon module M where import Prelude(map(..)) diff --git a/testsuite/tests/module/mod89.stderr b/testsuite/tests/module/mod89.stderr index 0f956536cb..b355f3050b 100644 --- a/testsuite/tests/module/mod89.stderr +++ b/testsuite/tests/module/mod89.stderr @@ -1,2 +1,10 @@ - -mod89.hs:3:16: Module ‘Prelude’ does not export ‘map(..)’ +
+mod89.hs:5:1: warning:
+ The import item ‘map(..)’ suggests that
+ ‘map’ has (in-scope) constructors or class methods,
+ but it has none
+
+mod89.hs:5:1: warning:
+ The import of ‘Prelude’ is redundant
+ except perhaps to import instances from ‘Prelude’
+ To import instances alone, use: import Prelude()
diff --git a/testsuite/tests/typecheck/should_fail/T9858a.stderr b/testsuite/tests/typecheck/should_fail/T9858a.stderr index 2f815b1824..61c62eaeec 100644 --- a/testsuite/tests/typecheck/should_fail/T9858a.stderr +++ b/testsuite/tests/typecheck/should_fail/T9858a.stderr @@ -1,14 +1,14 @@ - -T9858a.hs:28:18: error: - No instance for (Typeable - (((() :: Constraint), (() :: Constraint)) => ())) - (maybe you haven't applied a function to enough arguments?) - arising from a use of ‘cast’ - In the expression: cast e - In the expression: case cast e of { Just e' -> ecast e' } - In an equation for ‘supercast’: - supercast - = case cast e of { Just e' -> ecast e' } - where - e = Refl - e :: E PX PX +
+T9858a.hs:28:18: error:
+ No instance for (Typeable
+ ((() :: Constraint, () :: Constraint) => ()))
+ (maybe you haven't applied a function to enough arguments?)
+ arising from a use of ‘cast’
+ In the expression: cast e
+ In the expression: case cast e of { Just e' -> ecast e' }
+ In an equation for ‘supercast’:
+ supercast
+ = case cast e of { Just e' -> ecast e' }
+ where
+ e = Refl
+ e :: E PX PX
diff --git a/testsuite/tests/typecheck/should_fail/fd-loop.stderr b/testsuite/tests/typecheck/should_fail/fd-loop.stderr index 96fbc3ef18..44a0618181 100644 --- a/testsuite/tests/typecheck/should_fail/fd-loop.stderr +++ b/testsuite/tests/typecheck/should_fail/fd-loop.stderr @@ -1,12 +1,12 @@ - -fd-loop.hs:12:10: - Variable ‘b’ occurs more often than in the instance head - in the constraint: C a b - (Use UndecidableInstances to permit this) - In the instance declaration for ‘Eq (T a)’ - -fd-loop.hs:12:10: - Variable ‘b’ occurs more often than in the instance head - in the constraint: Eq b - (Use UndecidableInstances to permit this) - In the instance declaration for ‘Eq (T a)’ +
+fd-loop.hs:12:10: error:
+ Variable ‘b’ occurs more often
+ in the constraint ‘C a b’ than in the instance head
+ (Use UndecidableInstances to permit this)
+ In the instance declaration for ‘Eq (T a)’
+
+fd-loop.hs:12:10: error:
+ Variable ‘b’ occurs more often
+ in the constraint ‘Eq b’ than in the instance head
+ (Use UndecidableInstances to permit this)
+ In the instance declaration for ‘Eq (T a)’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail108.stderr b/testsuite/tests/typecheck/should_fail/tcfail108.stderr index 3a2e5a5657..da766582b3 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail108.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail108.stderr @@ -1,6 +1,6 @@ tcfail108.hs:7:10: error:
- Variable ‘f’ occurs more often than in the instance head
- in the constraint: Eq (f (Rec f))
+ Variable ‘f’ occurs more often
+ in the constraint ‘Eq (f (Rec f))’ than in the instance head
(Use UndecidableInstances to permit this)
In the instance declaration for ‘Eq (Rec f)’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail154.stderr b/testsuite/tests/typecheck/should_fail/tcfail154.stderr index 9014b643df..903f61b7de 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail154.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail154.stderr @@ -1,6 +1,6 @@ - -tcfail154.hs:12:10: - Variable ‘a’ occurs more often than in the instance head - in the constraint: C a a - (Use UndecidableInstances to permit this) - In the instance declaration for ‘Eq (T a)’ +
+tcfail154.hs:12:10: error:
+ Variable ‘a’ occurs more often
+ in the constraint ‘C a a’ than in the instance head
+ (Use UndecidableInstances to permit this)
+ In the instance declaration for ‘Eq (T a)’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail157.stderr b/testsuite/tests/typecheck/should_fail/tcfail157.stderr index acdc7df8cf..113e0cc67e 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail157.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail157.stderr @@ -1,12 +1,12 @@ - -tcfail157.hs:27:10: - Variable ‘b’ occurs more often than in the instance head - in the constraint: E m a b - (Use UndecidableInstances to permit this) - In the instance declaration for ‘Foo m (a -> ())’ - -tcfail157.hs:27:10: - Variable ‘b’ occurs more often than in the instance head - in the constraint: Foo m b - (Use UndecidableInstances to permit this) - In the instance declaration for ‘Foo m (a -> ())’ +
+tcfail157.hs:27:10: error:
+ Variable ‘b’ occurs more often
+ in the constraint ‘E m a b’ than in the instance head
+ (Use UndecidableInstances to permit this)
+ In the instance declaration for ‘Foo m (a -> ())’
+
+tcfail157.hs:27:10: error:
+ Variable ‘b’ occurs more often
+ in the constraint ‘Foo m b’ than in the instance head
+ (Use UndecidableInstances to permit this)
+ In the instance declaration for ‘Foo m (a -> ())’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail213.stderr b/testsuite/tests/typecheck/should_fail/tcfail213.stderr index a6b63bd9f1..a29b758a42 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail213.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail213.stderr @@ -1,7 +1,7 @@ - -tcfail213.hs:8:1: - Illegal constraint ‘F a’ in a superclass/instance context - (Use UndecidableInstances to permit this) - In the context: F a - While checking the super-classes of class ‘C’ - In the class declaration for ‘C’ +
+tcfail213.hs:8:1: error:
+ Illegal constraint ‘F a’ in a superclass context
+ (Use UndecidableInstances to permit this)
+ 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 5520a3eff1..a2741b876b 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail214.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail214.stderr @@ -1,7 +1,5 @@ - -tcfail214.hs:9:10: - Illegal constraint ‘F a’ in a superclass/instance context - (Use UndecidableInstances to permit this) - In the context: F a - While checking an instance declaration - In the instance declaration for ‘C [a]’ +
+tcfail214.hs:9:10: error:
+ The constraint ‘F a’ is no smaller than the instance head
+ (Use UndecidableInstances to permit this)
+ In the instance declaration for ‘C [a]’
diff --git a/testsuite/tests/typecheck/should_fail/tcfail220.hsig b/testsuite/tests/typecheck/should_fail/tcfail220.hsig index 129bae368c..560fc317a6 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail220.hsig +++ b/testsuite/tests/typecheck/should_fail/tcfail220.hsig @@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude #-} module ShouldFail where -data Bool a b c d = False data Maybe a b = Nothing diff --git a/testsuite/tests/typecheck/should_fail/tcfail220.stderr b/testsuite/tests/typecheck/should_fail/tcfail220.stderr index 6a4e87382d..432dc4c1a3 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail220.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail220.stderr @@ -1,17 +1,9 @@ -[1 of 1] Compiling ShouldFail[sig of Prelude] ( tcfail220.hsig, nothing ) - -tcfail220.hsig:4:1: error: - Type constructor ‘Bool’ has conflicting definitions in the module - and its hsig file - Main module: data Bool = False | True - Hsig file: type role Bool phantom phantom phantom phantom - data Bool a b c d = False - The types have different kinds - -tcfail220.hsig:5:1: error: - Type constructor ‘Maybe’ has conflicting definitions in the module - and its hsig file - Main module: data Maybe a = Nothing | Just a - Hsig file: type role Maybe phantom phantom - data Maybe a b = Nothing - The types have different kinds +[1 of 1] Compiling ShouldFail[sig of Prelude] ( tcfail220.hsig, nothing )
+
+tcfail220.hsig:4:1: error:
+ Type constructor ‘Maybe’ has conflicting definitions in the module
+ and its hsig file
+ Main module: data Maybe a = Nothing | Just a
+ Hsig file: type role Maybe phantom phantom
+ data Maybe a b = Nothing
+ The types have different kinds
|