[Haskell-cafe] How to get a list of constructors for a type?
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...
More information about the Haskell-Cafe