[commit: ghc] master: Add testcase for #9177 and adjust test output (d3cae19)
git at git.haskell.org
git at git.haskell.org
Fri Jun 6 11:18:04 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/d3cae19055d6f148b6085fb5d6885a1826215aad/ghc
>---------------------------------------------------------------
commit d3cae19055d6f148b6085fb5d6885a1826215aad
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Fri Jun 6 12:28:55 2014 +0200
Add testcase for #9177 and adjust test output
>---------------------------------------------------------------
d3cae19055d6f148b6085fb5d6885a1826215aad
testsuite/tests/module/mod132.stderr | 4 +++-
testsuite/tests/module/mod134.stderr | 2 +-
testsuite/tests/module/mod73.stderr | 6 +++---
testsuite/tests/rename/should_fail/T9177.hs | 17 +++++++++++++++++
testsuite/tests/rename/should_fail/T9177.stderr | 20 ++++++++++++++++++++
testsuite/tests/rename/should_fail/all.T | 1 +
.../tests/typecheck/should_fail/tcfail062.stderr | 2 ++
7 files changed, 47 insertions(+), 5 deletions(-)
diff --git a/testsuite/tests/module/mod132.stderr b/testsuite/tests/module/mod132.stderr
index 2735a73..0a9d25c 100644
--- a/testsuite/tests/module/mod132.stderr
+++ b/testsuite/tests/module/mod132.stderr
@@ -1,2 +1,4 @@
-mod132.hs:6:7: Not in scope: data constructor ‘Foo’
+mod132.hs:6:7:
+ Not in scope: data constructor ‘Foo’
+ Perhaps you meant variable ‘foo’ (line 6)
diff --git a/testsuite/tests/module/mod134.stderr b/testsuite/tests/module/mod134.stderr
index e2171a8..d6e6f0e 100644
--- a/testsuite/tests/module/mod134.stderr
+++ b/testsuite/tests/module/mod134.stderr
@@ -4,4 +4,4 @@ mod134.hs:6:19:
Perhaps you meant one of these:
‘Prelude.read’ (imported from Prelude),
‘Prelude.reads’ (imported from Prelude),
- ‘Prelude.snd’ (imported from Prelude)
+ data constructor ‘Prelude.Left’ (imported from Prelude)
diff --git a/testsuite/tests/module/mod73.stderr b/testsuite/tests/module/mod73.stderr
index 432f61b..d19a032 100644
--- a/testsuite/tests/module/mod73.stderr
+++ b/testsuite/tests/module/mod73.stderr
@@ -2,6 +2,6 @@
mod73.hs:3:7:
Not in scope: ‘Prelude.g’
Perhaps you meant one of these:
- ‘Prelude.id’ (imported from Prelude),
- ‘Prelude.log’ (imported from Prelude),
- ‘Prelude.pi’ (imported from Prelude)
+ data constructor ‘Prelude.GT’ (imported from Prelude),
+ data constructor ‘Prelude.EQ’ (imported from Prelude),
+ data constructor ‘Prelude.LT’ (imported from Prelude)
diff --git a/testsuite/tests/rename/should_fail/T9177.hs b/testsuite/tests/rename/should_fail/T9177.hs
new file mode 100644
index 0000000..9fbb940
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T9177.hs
@@ -0,0 +1,17 @@
+module T9177 where
+
+-- the main use case
+type Foo = (int)
+
+-- other interesting cases
+type Foo2 = (integerr)
+
+foo3 = bar
+foo4 = Fun
+
+-- this warning is suboptimal (fun would be illegal here)
+foo5 Fun = ()
+
+-- No errors here:
+data Bar = Bar
+fun x = x
diff --git a/testsuite/tests/rename/should_fail/T9177.stderr b/testsuite/tests/rename/should_fail/T9177.stderr
new file mode 100644
index 0000000..f87ec73
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T9177.stderr
@@ -0,0 +1,20 @@
+
+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 14)
+
+T9177.hs:10:8:
+ Not in scope: data constructor ‘Fun’
+ Perhaps you meant variable ‘fun’ (line 15)
+
+T9177.hs:11:6:
+ Not in scope: data constructor ‘Fun’
+ Perhaps you meant variable ‘fun’ (line 15)
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index f4c3570..0f60ff6 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -114,3 +114,4 @@ test('T8448', normal, compile_fail, [''])
test('T9006',
extra_clean(['T9006a.hi', 'T9006a.o']),
multimod_compile_fail, ['T9006', '-v0'])
+test('T9177', normal, compile_fail, [''])
diff --git a/testsuite/tests/typecheck/should_fail/tcfail062.stderr b/testsuite/tests/typecheck/should_fail/tcfail062.stderr
index 1396b53..ff4915d 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail062.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail062.stderr
@@ -1,6 +1,8 @@
tcfail062.hs:34:6:
Not in scope: type variable ‘behaviouralExpression’
+ Perhaps you meant type constructor or class ‘BehaviouralExpression’ (line 25)
tcfail062.hs:34:29:
Not in scope: type variable ‘behaviouralExpression’
+ Perhaps you meant type constructor or class ‘BehaviouralExpression’ (line 25)
More information about the ghc-commits
mailing list