summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/rename
diff options
context:
space:
mode:
authorsimonpj <unknown>2004-05-25 09:04:57 +0000
committersimonpj <unknown>2004-05-25 09:04:57 +0000
commitc4ffa6542877ef3d5f660e9111520212816eacf7 (patch)
tree42976c153bdeefde3283f6cd619066e4ba3240cc /testsuite/tests/ghc-regress/rename
parentf93ea08c1e315a69767015b8bf644b91ce61dd38 (diff)
downloadhaskell-c4ffa6542877ef3d5f660e9111520212816eacf7.tar.gz
[project @ 2004-05-25 09:04:56 by simonpj]
Add test for decent failure on built-in syntax
Diffstat (limited to 'testsuite/tests/ghc-regress/rename')
-rw-r--r--testsuite/tests/ghc-regress/rename/should_fail/all.T1
-rw-r--r--testsuite/tests/ghc-regress/rename/should_fail/rnfail042.hs9
-rw-r--r--testsuite/tests/ghc-regress/rename/should_fail/rnfail042.stderr8
3 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/rename/should_fail/all.T b/testsuite/tests/ghc-regress/rename/should_fail/all.T
index efb0074542..69a4154145 100644
--- a/testsuite/tests/ghc-regress/rename/should_fail/all.T
+++ b/testsuite/tests/ghc-regress/rename/should_fail/all.T
@@ -41,3 +41,4 @@ test('rnfail039', normal, compile_fail, [''])
test('rnfail040', normal, multimod_compile_fail, ['rnfail040', '-v0'])
test('rnfail041', normal, compile_fail, [''])
+test('rnfail042', normal, compile_fail, [''])
diff --git a/testsuite/tests/ghc-regress/rename/should_fail/rnfail042.hs b/testsuite/tests/ghc-regress/rename/should_fail/rnfail042.hs
new file mode 100644
index 0000000000..16c01f3450
--- /dev/null
+++ b/testsuite/tests/ghc-regress/rename/should_fail/rnfail042.hs
@@ -0,0 +1,9 @@
+-- Uses of built-in syntax should provoke a decent error message
+
+module ShouldFail where
+
+data T0 = ()
+data T3= (,,,)
+data Nil = []
+data List = Int : Bool
+
diff --git a/testsuite/tests/ghc-regress/rename/should_fail/rnfail042.stderr b/testsuite/tests/ghc-regress/rename/should_fail/rnfail042.stderr
new file mode 100644
index 0000000000..1261810014
--- /dev/null
+++ b/testsuite/tests/ghc-regress/rename/should_fail/rnfail042.stderr
@@ -0,0 +1,8 @@
+
+rnfail042.hs:1:0: Illegal binding of built-in syntax: :
+
+rnfail042.hs:1:0: Illegal binding of built-in syntax: []
+
+rnfail042.hs:1:0: Illegal binding of built-in syntax: (,,,)
+
+rnfail042.hs:1:0: Illegal binding of built-in syntax: ()