diff --git a/tests/th/T7532.stderr b/tests/th/T7532.stderr index 03f0cf7cd..840be3adf 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 60d8e018a..f65d61279 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 6c1ea38cb..e69de29bb 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 ad1c4e978..0499988a1 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, [''])