Template Haskell...
Ulf Norell
ulfn at cs.chalmers.se
Thu Oct 21 05:57:52 EDT 2004
MR K P SCHUPKE wrote:
>Thanks for the URL... I have realised I jumped the gun saying the derivation can be
>done in template-haskell... there is one small problem:
>
>$(derive [t| SomeConstructor a b |])
>
>passes the constructor to derive... is there any way to get the type information
>for some type? You can do
>
>$(derive [d| data X a b = X1 a b |])
>
>Is there any way to get the same information from something like:
>
>$(derive2 [T| X a b |])
>
>
You would have to say
$(derive (reifyDecl X))
/ Ulf
More information about the Glasgow-haskell-users
mailing list