[commit: testsuite] wip/th-new: Update tests now that declaration splices are legal everywhere. (1baab5b)

git at git.haskell.org git
Fri Oct 4 21:48:50 UTC 2013


Repository : ssh://git at git.haskell.org/testsuite

On branch  : wip/th-new
Link       : http://ghc.haskell.org/trac/ghc/changeset/1baab5b2062778a75afd8bf5e959dd4bf5808873/testsuite

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

commit 1baab5b2062778a75afd8bf5e959dd4bf5808873
Author: Geoffrey Mainland <mainland at apeiron.net>
Date:   Mon May 20 11:38:54 2013 +0100

    Update tests now that declaration splices are legal everywhere.


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

1baab5b2062778a75afd8bf5e959dd4bf5808873
 tests/th/T7532.stderr     |    2 +-
 tests/th/TH_dataD1.hs     |    3 ++-
 tests/th/TH_dataD1.stderr |    5 -----
 tests/th/all.T            |    2 +-
 4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/tests/th/T7532.stderr b/tests/th/T7532.stderr
index 03f0cf7..840be3a 100644
--- a/tests/th/T7532.stderr
+++ b/tests/th/T7532.stderr
@@ -5,7 +5,7 @@ instance C Bool where
 
 
 ==================== Renamer ====================
-bang
+$bang
 
 T7532.hs:1:1: Splicing declarations
     bang
diff --git a/tests/th/TH_dataD1.hs b/tests/th/TH_dataD1.hs
index 60d8e01..f65d612 100644
--- a/tests/th/TH_dataD1.hs
+++ b/tests/th/TH_dataD1.hs
@@ -5,6 +5,7 @@ import Language.Haskell.TH
 
 ds :: Q [Dec]
 ds = [d|
-          $(dataD [] (mkName "D") [] [normalC "K" []] [])
+          $(do { d <- dataD (cxt []) (mkName "D") [] [normalC (mkName "K") []] []
+               ; return [d]})
        |]
 
diff --git a/tests/th/TH_dataD1.stderr b/tests/th/TH_dataD1.stderr
index 6c1ea38..e69de29 100644
--- a/tests/th/TH_dataD1.stderr
+++ b/tests/th/TH_dataD1.stderr
@@ -1,5 +0,0 @@
-
-TH_dataD1.hs:8:13:
-    Declaration splices are not permitted inside declaration brackets
-    In the Template Haskell quotation
-      [d| $(dataD [] (mkName "D") [] [normalC "K" []] []) |]
diff --git a/tests/th/all.T b/tests/th/all.T
index c8b0cab..9b9b730 100644
--- a/tests/th/all.T
+++ b/tests/th/all.T
@@ -120,7 +120,7 @@ test('TH_dupdecl', normal, compile_fail, ['-v0'])
 test('TH_exn2', normal, compile_fail, ['-v0'])
 
 test('TH_recover', normal, compile_and_run, [''])
-test('TH_dataD1', normal, compile_fail, ['-v0'])
+test('TH_dataD1', normal, compile, ['-v0'])
 
 test('TH_ppr1', normal, compile_and_run, [''])
 




More information about the ghc-commits mailing list