MR K P SCHUPKE k.schupke at
Wed Oct 20 10:37:03 EDT 2004

As posted on this list, there is template-haskell code to do:

>$(derive [| data Foo = Foo |])

You can also get the type of Foo in TH by doing:

dummy :: Foo
dummy = undefined
$(derive2 "dummy")

and the code for derive2 reify's the argument, which then gives the
reflected type... so the example code given for the first form can
be adapted to the second use.

As you can already do this in TH, why introduce another extension?


More information about the Glasgow-haskell-users mailing list