summaryrefslogtreecommitdiff
path: root/tests/examples/ghc86/TH_spliceDecl2.hs
blob: c5c986d3d6fc785d99b35846d31a076816ef1f55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- test splicing of quoted data and newtype declarations
{-# LANGUAGE TemplateHaskell #-}

module TH_spliceDecl2
where

import Language.Haskell.TH

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

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