[commit: testsuite] master: Add new test for the second round of #7667 (1270e25)

git at git.haskell.org git at git.haskell.org
Wed Oct 23 13:28:31 UTC 2013


Repository : ssh://git@git.haskell.org/testsuite

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1270e252f6bc9eff140a78ec6b27472d2c373fef/testsuite

>---------------------------------------------------------------

commit 1270e252f6bc9eff140a78ec6b27472d2c373fef
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Mon Oct 21 10:10:00 2013 -0400

    Add new test for the second round of #7667


>---------------------------------------------------------------

1270e252f6bc9eff140a78ec6b27472d2c373fef
 tests/th/T7667a.hs     |    8 ++++++++
 tests/th/T7667a.stderr |    5 +++++
 tests/th/all.T         |    1 +
 3 files changed, 14 insertions(+)

diff --git a/tests/th/T7667a.hs b/tests/th/T7667a.hs
new file mode 100644
index 0000000..9f829a0
--- /dev/null
+++ b/tests/th/T7667a.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T7667a where
+
+import Language.Haskell.TH
+
+   -- to be correct, this should be ConE, not VarE!
+false = $( return $ VarE (mkName "False") )
\ No newline at end of file
diff --git a/tests/th/T7667a.stderr b/tests/th/T7667a.stderr
new file mode 100644
index 0000000..b8258cb
--- /dev/null
+++ b/tests/th/T7667a.stderr
@@ -0,0 +1,5 @@
+
+T7667a.hs:8:12:
+    Illegal variable name: ‛False’
+    When splicing a TH expression: False
+    In the expression: $(return $ VarE (mkName "False"))
diff --git a/tests/th/all.T b/tests/th/all.T
index 8d5fe11..e38297f 100644
--- a/tests/th/all.T
+++ b/tests/th/all.T
@@ -301,4 +301,5 @@ test('T6062', normal, compile, ['-v0'])
 test('T4364', normal, compile, ['-v0'])
 test('T8412', normal, compile_fail, ['-v0'])
 test('T7667', normal, compile, ['-v0'])
+test('T7667a', normal, compile_fail, ['-v0'])
 test('T8455', normal, compile, ['-v0'])
\ No newline at end of file



More information about the ghc-commits mailing list