On Tue, Sep 2, 2008 at 4:19 PM, Ganesh Sittampalam <[EMAIL PROTECTED]> wrote: > On Tue, 2 Sep 2008, Ashley Yakeley wrote: >> >> It's worse than that. If you derive an instance of Typeable for your type, >> it means everyone else can peer into your constructor functions and other >> internals. Sure, it's not unsafe, but it sure is ugly. > > True. I would argue that this is better solved with a better typeclass > hierarchy (e.g. one class to supply a witness-style representation that only > supports equality, then the typereps on top of that if you want > introspection too).
Isn't that what we have right now? Typeable gives you a TypeRep, which can be compared for equality. All the introspection stuff is in Data. -- Dave Menendez <[EMAIL PROTECTED]> <http://www.eyrie.org/~zednenem/> _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe