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

git at git.haskell.org git at git.haskell.org
Mon Nov 3 18:51:25 UTC 2014


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

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

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

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

    Test #9209 in th/T9209


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

6f92ff847792d8482191ce2aab4218b89611f37c
 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 c7045c4..5151fd7 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -336,3 +336,4 @@ test('T8953', normal, compile, ['-v0'])
 test('T9084', normal, compile_fail, ['-v0'])
 test('T9738', normal, compile, ['-v0'])
 test('T9066', normal, compile, ['-v0'])
+test('T9209', expect_broken(9209), compile_fail, ['-v0'])



More information about the ghc-commits mailing list