T5984_Lib.hs 318 Bytes
Newer Older
pcapriotti's avatar
pcapriotti committed
1 2 3 4 5 6 7 8 9 10 11 12 13
{-# LANGUAGE TemplateHaskell #-}

module T5984_Lib where

import Language.Haskell.TH

nt :: Q [Dec]
nt = return [NewtypeD [] foo [] (NormalC foo [(NotStrict, ConT ''Int)]) []]
  where foo = mkName "Foo"

dt :: Q [Dec]
dt = return [DataD [] bar [] [NormalC bar [(NotStrict, ConT ''Int)]] []]
  where bar = mkName "Bar"