TH_spliceDecl2.hs 216 Bytes
Newer Older
1
-- test splicing of quoted data and newtype declarations
chak's avatar
chak committed
2 3 4 5

module TH_spliceDecl2
where

6
import Language.Haskell.TH
chak's avatar
chak committed
7

8 9 10 11
-- splice a simple quoted declaration (x 2)
$([d| data T1 = C1 |])

$([d| newtype T2 = C2 String |])