diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-06-25 09:25:39 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-06-26 08:33:12 +0100 |
commit | b98ff25f4c8cb4bf18b784c848fabaaa6e4b11b8 (patch) | |
tree | 057dce79c8f2c77689cc2ed375c89858b38a4b4d /testsuite/tests/rename | |
parent | fb7b6922573af76a954d939c85e6af7c39a19896 (diff) | |
download | haskell-b98ff25f4c8cb4bf18b784c848fabaaa6e4b11b8.tar.gz |
Error message wibbles from out-of-scope changes
The patch "Treat out-of-scope variables as holes" makes
lots of error messages change a bit. This patch has all
the change.
Diffstat (limited to 'testsuite/tests/rename')
-rw-r--r-- | testsuite/tests/rename/should_fail/RnStaticPointersFail02.stderr | 11 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T2310.stderr | 15 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T2993.stderr | 8 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T7937.stderr | 8 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T9177.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T9177.stderr | 32 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T9177a.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T9177a.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/all.T | 1 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/mc13.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/mc14.stderr | 16 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/rnfail022.stderr | 8 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/rnfail024.stderr | 10 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/rnfail049.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/rnfail050.stderr | 4 |
15 files changed, 75 insertions, 59 deletions
diff --git a/testsuite/tests/rename/should_fail/RnStaticPointersFail02.stderr b/testsuite/tests/rename/should_fail/RnStaticPointersFail02.stderr index 52e3609e92..de145e789a 100644 --- a/testsuite/tests/rename/should_fail/RnStaticPointersFail02.stderr +++ b/testsuite/tests/rename/should_fail/RnStaticPointersFail02.stderr @@ -1,3 +1,8 @@ - -RnStaticPointersFail02.hs:5:12: error: - Not in scope: data constructor ‘T’ +
+RnStaticPointersFail02.hs:5:5: error:
+ No instance for (Typeable t0) arising from a static form
+ In the expression: static T
+ In an equation for ‘f’: f = static T
+
+RnStaticPointersFail02.hs:5:12: error:
+ Data constructor not in scope: T
diff --git a/testsuite/tests/rename/should_fail/T2310.stderr b/testsuite/tests/rename/should_fail/T2310.stderr index 807a574f75..5e9e6ba59a 100644 --- a/testsuite/tests/rename/should_fail/T2310.stderr +++ b/testsuite/tests/rename/should_fail/T2310.stderr @@ -1,10 +1,5 @@ - -T2310.hs:5:22: - Illegal result type signature ‘a’ - Result signatures are no longer supported in pattern matches - In a lambda abstraction: \ x :: a -> (x :: a) - -T2310.hs:5:39: - Not in scope: ‘co’ - Perhaps you meant one of these: - ‘c’ (line 5), ‘cos’ (imported from Prelude) +
+T2310.hs:5:41: error:
+ Variable not in scope: co
+ Perhaps you meant one of these:
+ ‘c’ (line 5), ‘cos’ (imported from Prelude)
diff --git a/testsuite/tests/rename/should_fail/T2993.stderr b/testsuite/tests/rename/should_fail/T2993.stderr index 144ebffccf..44582b33dc 100644 --- a/testsuite/tests/rename/should_fail/T2993.stderr +++ b/testsuite/tests/rename/should_fail/T2993.stderr @@ -1,4 +1,4 @@ - -T2993.hs:7:13: - Not in scope: ‘<**>’ - Perhaps you meant ‘<*>’ (imported from Prelude) +
+T2993.hs:7:13: error:
+ Variable not in scope: (<**>) :: t1 -> (a -> a) -> t
+ Perhaps you meant ‘<*>’ (imported from Prelude)
diff --git a/testsuite/tests/rename/should_fail/T7937.stderr b/testsuite/tests/rename/should_fail/T7937.stderr index 3bae064072..8a5edd37c7 100644 --- a/testsuite/tests/rename/should_fail/T7937.stderr +++ b/testsuite/tests/rename/should_fail/T7937.stderr @@ -1,4 +1,4 @@ - -T7937.hs:8:13: - Not in scope: ‘***’ - Perhaps you meant ‘**’ (imported from Prelude) +
+T7937.hs:8:13: error:
+ Variable not in scope: (***) :: Bool -> Bool -> t
+ Perhaps you meant ‘**’ (imported from Prelude)
diff --git a/testsuite/tests/rename/should_fail/T9177.hs b/testsuite/tests/rename/should_fail/T9177.hs index 9fbb9407be..9d9c482027 100644 --- a/testsuite/tests/rename/should_fail/T9177.hs +++ b/testsuite/tests/rename/should_fail/T9177.hs @@ -6,6 +6,9 @@ type Foo = (int) -- other interesting cases type Foo2 = (integerr) +-- These two out-of-scope errors aren't caught until +-- the type checker, so they aren't reported at all +-- becuase the renamer aborts compilation foo3 = bar foo4 = Fun diff --git a/testsuite/tests/rename/should_fail/T9177.stderr b/testsuite/tests/rename/should_fail/T9177.stderr index 624034053f..421a600b3c 100644 --- a/testsuite/tests/rename/should_fail/T9177.stderr +++ b/testsuite/tests/rename/should_fail/T9177.stderr @@ -1,20 +1,12 @@ - -T9177.hs:4:13: - Not in scope: type variable ‘int’ - Perhaps you meant type constructor or class ‘Int’ (imported from Prelude) - -T9177.hs:7:14: - Not in scope: type variable ‘integerr’ - Perhaps you meant type constructor or class ‘Integer’ (imported from Prelude) - -T9177.hs:9:8: - Not in scope: ‘bar’ - Perhaps you meant data constructor ‘Bar’ (line 16) - -T9177.hs:10:8: - Not in scope: data constructor ‘Fun’ - Perhaps you meant variable ‘fun’ (line 17) - -T9177.hs:13:6: - Not in scope: data constructor ‘Fun’ - Perhaps you meant variable ‘fun’ (line 17) +
+T9177.hs:4:13: error:
+ Not in scope: type variable ‘int’
+ Perhaps you meant type constructor or class ‘Int’ (imported from Prelude)
+
+T9177.hs:7:14: error:
+ Not in scope: type variable ‘integerr’
+ Perhaps you meant type constructor or class ‘Integer’ (imported from Prelude)
+
+T9177.hs:16:6: error:
+ Not in scope: data constructor ‘Fun’
+ Perhaps you meant variable ‘fun’ (line 20)
diff --git a/testsuite/tests/rename/should_fail/T9177a.hs b/testsuite/tests/rename/should_fail/T9177a.hs new file mode 100644 index 0000000000..57987647cb --- /dev/null +++ b/testsuite/tests/rename/should_fail/T9177a.hs @@ -0,0 +1,6 @@ +module T9177a where + +foo3 = bar +foo4 = Fun + + diff --git a/testsuite/tests/rename/should_fail/T9177a.stderr b/testsuite/tests/rename/should_fail/T9177a.stderr new file mode 100644 index 0000000000..858dabea71 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T9177a.stderr @@ -0,0 +1,4 @@ +
+T9177a.hs:3:8: error: Variable not in scope: bar
+
+T9177a.hs:4:8: error: Data constructor not in scope: Fun
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index 2aeee2f6fc..0df986889d 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -123,6 +123,7 @@ test('T9006', multimod_compile_fail, ['T9006', '-v0']) test('T9156', normal, compile_fail, ['']) test('T9177', normal, compile_fail, ['']) +test('T9177a', normal, compile_fail, ['']) test('T9436', normal, compile_fail, ['']) test('T9437', normal, compile_fail, ['']) test('T9077', normal, compile_fail, ['']) diff --git a/testsuite/tests/rename/should_fail/mc13.stderr b/testsuite/tests/rename/should_fail/mc13.stderr index 4d615c2f23..d4bc26b389 100644 --- a/testsuite/tests/rename/should_fail/mc13.stderr +++ b/testsuite/tests/rename/should_fail/mc13.stderr @@ -1,2 +1,2 @@ - -mc13.hs:12:37: Not in scope: ‘f’ +
+mc13.hs:12:37: error: Variable not in scope: f :: [a] -> m a
diff --git a/testsuite/tests/rename/should_fail/mc14.stderr b/testsuite/tests/rename/should_fail/mc14.stderr index 04321ff524..860d483ffe 100644 --- a/testsuite/tests/rename/should_fail/mc14.stderr +++ b/testsuite/tests/rename/should_fail/mc14.stderr @@ -1,2 +1,14 @@ - -mc14.hs:14:49: Not in scope: ‘f’ +
+mc14.hs:14:16: error:
+ No instance for (Functor t0) arising from a use of ‘fmap’
+ The type variable ‘t0’ is ambiguous
+ Note: there are several potential instances:
+ instance Functor Maybe -- Defined in ‘GHC.Base’
+ instance Functor IO -- Defined in ‘GHC.Base’
+ instance Functor ((->) r) -- Defined in ‘GHC.Base’
+ ...plus two others
+ In the expression: fmap
+ In a stmt of a monad comprehension: then group using f
+ In the expression: [() | f <- functions, then group using f]
+
+mc14.hs:14:49: error: Variable not in scope: f :: [a] -> m (t0 a)
diff --git a/testsuite/tests/rename/should_fail/rnfail022.stderr b/testsuite/tests/rename/should_fail/rnfail022.stderr index fe23268548..8ca03df4e7 100644 --- a/testsuite/tests/rename/should_fail/rnfail022.stderr +++ b/testsuite/tests/rename/should_fail/rnfail022.stderr @@ -1,4 +1,4 @@ - -rnfail022.hs:8:5: - Not in scope: ‘intersperse’ - Perhaps you meant ‘L.intersperse’ (imported from Data.List) +
+rnfail022.hs:8:5: error:
+ Variable not in scope: intersperse
+ Perhaps you meant ‘L.intersperse’ (imported from Data.List)
diff --git a/testsuite/tests/rename/should_fail/rnfail024.stderr b/testsuite/tests/rename/should_fail/rnfail024.stderr index 83eed48b3a..0e3d594c3c 100644 --- a/testsuite/tests/rename/should_fail/rnfail024.stderr +++ b/testsuite/tests/rename/should_fail/rnfail024.stderr @@ -1,6 +1,4 @@ - -rnfail024.hs:3:1: - The type signature for ‘sig_without_a_defn’ - lacks an accompanying binding - -rnfail024.hs:6:5: Not in scope: ‘sig_without_a_defn’ +
+rnfail024.hs:3:1: error:
+ The type signature for ‘sig_without_a_defn’
+ lacks an accompanying binding
diff --git a/testsuite/tests/rename/should_fail/rnfail049.stderr b/testsuite/tests/rename/should_fail/rnfail049.stderr index 8fab0fef8b..b85c25ccdb 100644 --- a/testsuite/tests/rename/should_fail/rnfail049.stderr +++ b/testsuite/tests/rename/should_fail/rnfail049.stderr @@ -1,2 +1,2 @@ - -rnfail049.hs:12:49: Not in scope: ‘f’ +
+rnfail049.hs:12:49: error: Variable not in scope: f :: [a] -> [[a]]
diff --git a/testsuite/tests/rename/should_fail/rnfail050.stderr b/testsuite/tests/rename/should_fail/rnfail050.stderr index 61e0b43640..0f940f87b5 100644 --- a/testsuite/tests/rename/should_fail/rnfail050.stderr +++ b/testsuite/tests/rename/should_fail/rnfail050.stderr @@ -1,2 +1,2 @@ - -rnfail050.hs:10:37: Not in scope: ‘f’ +
+rnfail050.hs:10:37: error: Variable not in scope: f :: [a] -> [a]
|