Hello! I'm not sure if this is what you're asking for, as it doesn't fit that line of code. 'LitT' is a data constructor not a type constructor. So instead it'd be
reifyType (LitT ...) = ConE 'LitT ... If this is what you're looking for, then 'lift' is what you want: http://hackage.haskell.org/packages/archive/th-lift/latest/doc/html/Language-Haskell-TH-Lift.html<http://hackage.haskell.org/packages/archive/th-lift/0.5.5/doc/html/Language-Haskell-TH-Lift.html> In particular, I recommend using this package of template haskell orphans, rather than deriving your own: http://hackage.haskell.org/package/th-orphans Hope that helps! -Michael On Fri, Jul 12, 2013 at 4:45 AM, Jose A. Lopes <jabolo...@google.com> wrote: > Hello everyone, > > Is there a way to automatically reify a type ? > In other words, to do the following: > > reifyType (LitT ...) = ConT ''LitT ... > > I am using Template Haskell and I want the generated code to have > access to Type datatypes that were available to the Template Haskell > code. > > Cheers, > Jose > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe >
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe