diff options
Diffstat (limited to 'testsuite/tests/rename')
-rw-r--r-- | testsuite/tests/rename/should_compile/T4426.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/T4426.stderr | 53 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/T5331.stderr | 25 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/all.T | 2 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T2901.stderr | 3 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T5372.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T5372.stderr | 14 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/rnfail026.stderr | 18 |
8 files changed, 61 insertions, 70 deletions
diff --git a/testsuite/tests/rename/should_compile/T4426.hs b/testsuite/tests/rename/should_compile/T4426.hs index b04f59cd03..610f670e44 100644 --- a/testsuite/tests/rename/should_compile/T4426.hs +++ b/testsuite/tests/rename/should_compile/T4426.hs @@ -1,8 +1,13 @@ {-# LANGUAGE RankNTypes #-} -{-# OPTIONS_GHC -fwarn-context-quantification #-} +{- # OPTIONS_GHC -fwarn-context-quantification #-} module T4426 where +-- GHC 8.0 no longer allows implicit quantification +-- on the RHS. This is more consistent: +-- type F a = a -> m a +-- has always been rejected and hence so should +-- these four. (It was already deprecated in 7.10.) type F a = Monad m => a -> m a data X a = X (Eq b => a -> b) @@ -12,6 +17,7 @@ data Y a = Y { k :: Eq b => a -> b -> c } f :: forall b. (Monad m => m b) -> b f = undefined +-- But these ones are fine: type F' a = forall m. Monad m => a -> m a data X' a = X' (forall b. Eq b => a -> b) diff --git a/testsuite/tests/rename/should_compile/T4426.stderr b/testsuite/tests/rename/should_compile/T4426.stderr index f4e0c471d6..f731f3544d 100644 --- a/testsuite/tests/rename/should_compile/T4426.stderr +++ b/testsuite/tests/rename/should_compile/T4426.stderr @@ -1,35 +1,18 @@ - -T4426.hs:6:12: Warning: - Variable ‘m’ is implicitly quantified due to a context - Use explicit forall syntax instead. - This will become an error in GHC 7.12. - In the type ‘Monad m => a -> m a’ - In the declaration for type synonym ‘F’ - -T4426.hs:8:15: Warning: - Variable ‘b’ is implicitly quantified due to a context - Use explicit forall syntax instead. - This will become an error in GHC 7.12. - In the type ‘Eq b => a -> b’ - In the definition of data constructor ‘X’ - -T4426.hs:10:21: Warning: - Variable ‘b’ is implicitly quantified due to a context - Use explicit forall syntax instead. - This will become an error in GHC 7.12. - In the type ‘Eq b => a -> b -> c’ - In the definition of data constructor ‘Y’ - -T4426.hs:10:21: Warning: - Variable ‘c’ is implicitly quantified due to a context - Use explicit forall syntax instead. - This will become an error in GHC 7.12. - In the type ‘Eq b => a -> b -> c’ - In the definition of data constructor ‘Y’ - -T4426.hs:12:17: Warning: - Variable ‘m’ is implicitly quantified due to a context - Use explicit forall syntax instead. - This will become an error in GHC 7.12. - In the type ‘Monad m => m b’ - In the type signature for ‘f’ +
+T4426.hs:11:18: error: Not in scope: type variable ‘m’
+
+T4426.hs:11:28: error: Not in scope: type variable ‘m’
+
+T4426.hs:13:18: error: Not in scope: type variable ‘b’
+
+T4426.hs:13:28: error: Not in scope: type variable ‘b’
+
+T4426.hs:15:24: error: Not in scope: type variable ‘b’
+
+T4426.hs:15:34: error: Not in scope: type variable ‘b’
+
+T4426.hs:15:39: error: Not in scope: type variable ‘c’
+
+T4426.hs:17:23: error: Not in scope: type variable ‘m’
+
+T4426.hs:17:28: error: Not in scope: type variable ‘m’
diff --git a/testsuite/tests/rename/should_compile/T5331.stderr b/testsuite/tests/rename/should_compile/T5331.stderr index 562aa69978..13249b0e17 100644 --- a/testsuite/tests/rename/should_compile/T5331.stderr +++ b/testsuite/tests/rename/should_compile/T5331.stderr @@ -1,13 +1,12 @@ - -T5331.hs:8:17: Warning: - Unused quantified type variable ‘a’ - In the definition of data constructor ‘S1’ - -T5331.hs:11:16: Warning: - Unused quantified type variable ‘a’ - In the definition of data constructor ‘W1’ - -T5331.hs:13:13: Warning: - Unused quantified type variable ‘a’ - In the type ‘forall a. Int’ - In the type signature for ‘f’ +
+T5331.hs:8:17: warning:
+ Unused quantified type variable ‘a’
+ In the definition of data constructor ‘S1’
+
+T5331.hs:11:16: warning:
+ Unused quantified type variable ‘a’
+ In the definition of data constructor ‘W1’
+
+T5331.hs:13:13: warning:
+ Unused quantified type variable ‘a’
+ In the type ‘forall a. Int’
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T index 8a597827fe..c501eccd56 100644 --- a/testsuite/tests/rename/should_compile/all.T +++ b/testsuite/tests/rename/should_compile/all.T @@ -224,5 +224,5 @@ test('T7969', run_command, ['$MAKE -s --no-print-directory T7969']) test('T9127', normal, compile, ['']) -test('T4426', normal, compile, ['']) +test('T4426', normal, compile_fail, ['']) test('T9778', normal, compile, ['-fwarn-unticked-promoted-constructors']) diff --git a/testsuite/tests/rename/should_fail/T2901.stderr b/testsuite/tests/rename/should_fail/T2901.stderr index d5a2247ce1..2128989b4c 100644 --- a/testsuite/tests/rename/should_fail/T2901.stderr +++ b/testsuite/tests/rename/should_fail/T2901.stderr @@ -4,4 +4,5 @@ T2901.hs:6:5: error: No module named ‘F’ is imported. T2901.hs:6:13: error: - ‘F.field’ is not a (visible) constructor field name + Not in scope: ‘F.field’ + No module named ‘F’ is imported. diff --git a/testsuite/tests/rename/should_fail/T5372.hs b/testsuite/tests/rename/should_fail/T5372.hs index b0f5906c10..2e937b7cba 100644 --- a/testsuite/tests/rename/should_fail/T5372.hs +++ b/testsuite/tests/rename/should_fail/T5372.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE DisambiguateRecordFields #-} -module T5372 where -import qualified T5372a -notScope (MkS { x = n }) = n +{-# LANGUAGE DisambiguateRecordFields #-} +module T5372 where +import qualified T5372a +notScope (MkS { x = n }) = n diff --git a/testsuite/tests/rename/should_fail/T5372.stderr b/testsuite/tests/rename/should_fail/T5372.stderr index 9d3f06e7d4..5d7a9c4ead 100644 --- a/testsuite/tests/rename/should_fail/T5372.stderr +++ b/testsuite/tests/rename/should_fail/T5372.stderr @@ -1,6 +1,8 @@ - -T5372.hs:4:11: - Not in scope: data constructor ‘MkS’ - Perhaps you meant ‘T5372a.MkS’ (imported from T5372a) - -T5372.hs:4:17: ‘x’ is not a (visible) constructor field name +
+T5372.hs:4:11: error:
+ Not in scope: data constructor ‘MkS’
+ Perhaps you meant ‘T5372a.MkS’ (imported from T5372a)
+
+T5372.hs:4:17: error:
+ Not in scope: ‘x’
+ Perhaps you meant ‘T5372a.x’ (imported from T5372a)
diff --git a/testsuite/tests/rename/should_fail/rnfail026.stderr b/testsuite/tests/rename/should_fail/rnfail026.stderr index 22caa11c1d..f220f81812 100644 --- a/testsuite/tests/rename/should_fail/rnfail026.stderr +++ b/testsuite/tests/rename/should_fail/rnfail026.stderr @@ -1,9 +1,9 @@ - -rnfail026.hs:16:17: - The first argument of ‘Monad’ should have kind ‘* -> *’, - but ‘forall a. Eq a => Set a’ has kind ‘*’ - In the instance declaration for ‘Monad (forall a. Eq a => Set a)’ - -rnfail026.hs:19:10: - Illegal polymorphic or qualified type: forall a. [a] - In the instance declaration for ‘Eq (forall a. [a])’ +
+rnfail026.hs:16:27: error:
+ The first argument of ‘Monad’ should have kind ‘* -> *’,
+ but ‘Eq a => Set a’ has kind ‘*’
+ In the instance declaration for ‘Monad (forall a. Eq a => Set a)’
+
+rnfail026.hs:19:10: error:
+ Illegal polymorphic or qualified type: forall a. [a]
+ In the instance declaration for ‘Eq (forall a. [a])’
|