[Haskell-cafe] How to get a list of constructors for a type?

Gregory Propf gregorypropf at yahoo.com
Wed Dec 30 15:24:00 EST 2009

Say I have something like

data DT a = Foo a | Bar a | Boo a

I want something like a list of the constructors of DT, perhaps as [TypeRep].  I'm using Data.Typeable but can't seem to find what I need in there.  Everything there operates over constructors, not types.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091230/eb685a45/attachment.html

More information about the Haskell-Cafe mailing list