summaryrefslogtreecommitdiff
path: root/tests/examples/ghc86/TH_spliceDecl1.hs
blob: 020ba13caf4ee2439731ba14f1493af06067a5f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
-- test splicing of a generated data declarations
{-# LANGUAGE TemplateHaskell #-}

module TH_spliceDecl1
where

import Language.Haskell.TH


-- splice a simple data declaration
$(return [DataD [] (mkName "T") [] Nothing [NormalC (mkName "C") []] []])