[commit: ghc] master: Test #9209 in th/T9209 (6db0f6f)

git at git.haskell.org git at git.haskell.org
Thu Nov 20 21:41:20 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/6db0f6fe40287f16d34d12efae9249d2feb4878a/ghc

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

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

    Test #9209 in th/T9209


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

6db0f6fe40287f16d34d12efae9249d2feb4878a
 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 43eb438..b124fec 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -342,3 +342,4 @@ test('T9081', normal, compile, ['-v0'])
 test('T9066', normal, compile, ['-v0'])
 test('T8100', normal, compile, ['-v0'])
 test('T9064', normal, compile, ['-v0'])
+test('T9209', expect_broken(9209), compile_fail, ['-v0'])



More information about the ghc-commits mailing list