Add new test for the second round of #7667
authorRichard Eisenberg <eir@cis.upenn.edu>
Mon, 21 Oct 2013 14:10:00 +0000 (10:10 -0400)
committerRichard Eisenberg <eir@cis.upenn.edu>
Wed, 23 Oct 2013 13:23:24 +0000 (09:23 -0400)
testsuite/tests/th/T7667a.hs [new file with mode: 0644]
testsuite/tests/th/T7667a.stderr [new file with mode: 0644]
testsuite/tests/th/all.T

diff --git a/testsuite/tests/th/T7667a.hs b/testsuite/tests/th/T7667a.hs
new file mode 100644 (file)
index 0000000..9f829a0
--- /dev/null
@@ -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 (file)
index 0000000..b8258cb
--- /dev/null
@@ -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"))
index 8d5fe11..e38297f 100644 (file)
@@ -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