[commit: testsuite] th-new: Update tests now that declaration splices are legal everywhere. (3a07227)

Geoffrey Mainland gmainlan at microsoft.com
Wed Jun 12 13:52:18 CEST 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : th-new

https://github.com/ghc/testsuite/commit/3a0722725ed2817f4e2a53f4a9746340c9054c7c

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

commit 3a0722725ed2817f4e2a53f4a9746340c9054c7c
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.

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

 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 ad1c4e9..0499988 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