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

git at git.haskell.org git at git.haskell.org
Mon Sep 16 07:08:31 CEST 2013


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

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

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

commit 4bca0c123f2854e6d9e9dfefc35ae3b2cefbfc96
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.


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

4bca0c123f2854e6d9e9dfefc35ae3b2cefbfc96
 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 455f45d..e83e8cd 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