Test #7484 in th/T7484
authorRichard Eisenberg <eir@cis.upenn.edu>
Mon, 3 Nov 2014 20:33:51 +0000 (15:33 -0500)
committerRichard Eisenberg <eir@cis.upenn.edu>
Fri, 21 Nov 2014 16:15:44 +0000 (11:15 -0500)
testsuite/tests/th/T7484.hs [new file with mode: 0644]
testsuite/tests/th/T7484.stderr [new file with mode: 0644]
testsuite/tests/th/all.T

diff --git a/testsuite/tests/th/T7484.hs b/testsuite/tests/th/T7484.hs
new file mode 100644 (file)
index 0000000..b1a9cba
--- /dev/null
@@ -0,0 +1,7 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T7484 where
+
+import Language.Haskell.TH
+
+$( return [ ValD (VarP (mkName "a ")) (NormalB (LitE (IntegerL 5))) [] ] )
diff --git a/testsuite/tests/th/T7484.stderr b/testsuite/tests/th/T7484.stderr
new file mode 100644 (file)
index 0000000..3ffe123
--- /dev/null
@@ -0,0 +1,4 @@
+
+T7484.hs:7:4:
+    Illegal variable name: ‘a ’
+    When splicing a TH declaration: a  = 5
index 6c7b2e5..5109473 100644 (file)
@@ -343,3 +343,4 @@ test('T9066', normal, compile, ['-v0'])
 test('T8100', normal, compile, ['-v0'])
 test('T9064', normal, compile, ['-v0'])
 test('T9209', normal, compile_fail, ['-v0'])
+test('T7484', expect_broken(7484), compile_fail, ['-v0'])