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

git at git.haskell.org git at git.haskell.org
Tue Nov 18 20:21:37 UTC 2014


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

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

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

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

    Test #9209 in th/T9209


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

c464245f4c91986b7115108202845a561606294e
 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 90efcbd..466e925 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -339,3 +339,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