Skip to content

Commit

Permalink
Update tests now that declaration splices are legal everywhere.
Browse files Browse the repository at this point in the history
  • Loading branch information
mainland committed May 29, 2013
1 parent d780392 commit 2ea5af2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/th/T7532.stderr
Expand Up @@ -5,7 +5,7 @@ instance C Bool where


==================== Renamer ====================
bang
$bang

T7532.hs:1:1: Splicing declarations
bang
Expand Down
3 changes: 2 additions & 1 deletion tests/th/TH_dataD1.hs
Expand Up @@ -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]})
|]

5 changes: 0 additions & 5 deletions 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" []] []) |]
2 changes: 1 addition & 1 deletion tests/th/all.T
Expand Up @@ -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, [''])

Expand Down

0 comments on commit 2ea5af2

Please sign in to comment.