[commit: ghc] wip/rae: Test #9209 in th/T9209 (fa05d66)

git at git.haskell.org git at git.haskell.org
Tue Nov 4 16:36:34 UTC 2014


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/fa05d66e102138a7bb40fba7b8ab49bf2d5c2b33/ghc

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

commit fa05d66e102138a7bb40fba7b8ab49bf2d5c2b33
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Mon Nov 3 13:46:58 2014 -0500

    Test #9209 in th/T9209


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

fa05d66e102138a7bb40fba7b8ab49bf2d5c2b33
 testsuite/tests/th/T9209.hs     | 5 +++++
 testsuite/tests/th/T9209.stderr | 4 ++++
 testsuite/tests/th/all.T        | 1 +
 3 files changed, 10 insertions(+)

diff --git a/testsuite/tests/th/T9209.hs b/testsuite/tests/th/T9209.hs
new file mode 100644
index 0000000..46740ba
--- /dev/null
+++ b/testsuite/tests/th/T9209.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T9209 where
+
+foo = let $( [d| x = 5 |] ) in x
diff --git a/testsuite/tests/th/T9209.stderr b/testsuite/tests/th/T9209.stderr
new file mode 100644
index 0000000..1f4f3e7
--- /dev/null
+++ b/testsuite/tests/th/T9209.stderr
@@ -0,0 +1,4 @@
+
+T9209.hs:5:11:
+    Declaration splices are allowed only at the top level:
+      $([d| x = 5 |])
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index 342f5e3..8d55bf7 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -337,3 +337,4 @@ test('T9084', normal, compile_fail, ['-v0'])
 test('T9738', normal, compile, ['-v0'])
 test('T9081', normal, compile, ['-v0'])
 test('T9066', normal, compile, ['-v0'])
+test('T9209', expect_broken(9209), compile_fail, ['-v0'])



More information about the ghc-commits mailing list