[Haskell-cafe] Re: [Haskell] Top Level <-

David Menendez dave at zednenem.com
Tue Sep 2 16:37:01 EDT 2008

On Tue, Sep 2, 2008 at 4:19 PM, Ganesh Sittampalam <ganesh at earth.li> 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 <dave at zednenem.com>

More information about the Haskell-Cafe mailing list