[Haskell] Template id function

Mads Lindstrøm mads_lindstroem at yahoo.dk
Wed Jul 13 14:50:21 EDT 2005


I am trying to learn Meta Haskell. One thing I want to do is create an
identity function. It should get a type constructor as input and return
the same type constructor as output. It should be possible to do:

  $(idDecl data Foo = Foo Int)

and it should "return":

  data Foo = Foo Int

Is this possible? if yes, how does one do it?

Mads Lindstrøm <mads_lindstroem at yahoo.dk>

More information about the Haskell mailing list