Commit c2dc3369 authored by gmainland's avatar gmainland

Update tests now that declaration splices are legal everywhere.

parent 1d43475b
......@@ -5,7 +5,7 @@ instance C Bool where
==================== Renamer ====================
bang
$bang
T7532.hs:1:1: Splicing declarations
bang
......
......@@ -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]})
|]
TH_dataD1.hs:8:13:
Declaration splices are not permitted inside declaration brackets
In the Template Haskell quotation
[d| $(dataD [] (mkName "D") [] [normalC "K" []] []) |]
......@@ -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, [''])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment