summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2013-10-21 10:10:00 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2013-10-23 09:23:24 -0400
commitc43dd9731850df270f98fb37119e935f0fa89735 (patch)
tree5ec03c23247e155bf7340f9858d0037e52e90e1c
parent4d759845fecc3f5a796567722d399f46498c7abd (diff)
downloadhaskell-c43dd9731850df270f98fb37119e935f0fa89735.tar.gz
Add new test for the second round of #7667
-rw-r--r--testsuite/tests/th/T7667a.hs8
-rw-r--r--testsuite/tests/th/T7667a.stderr5
-rw-r--r--testsuite/tests/th/all.T1
3 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/th/T7667a.hs b/testsuite/tests/th/T7667a.hs
new file mode 100644
index 0000000000..9f829a0e6d
--- /dev/null
+++ b/testsuite/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/testsuite/tests/th/T7667a.stderr b/testsuite/tests/th/T7667a.stderr
new file mode 100644
index 0000000000..b8258cba6d
--- /dev/null
+++ b/testsuite/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/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index 8d5fe11283..e38297fc36 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/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