The dreaded M-R

Cale Gibbard cgibbard at gmail.com
Sat Jan 28 15:41:53 EST 2006


Is it really so impossible to implement typeclasses in a way which
avoids this problem altogether? Perhaps the need for the MR in the
first place is simply an indication that dictionary passing is not a
complete solution to implementing typeclasses. It seems quite
plausible that there should be an implementation which preserves
polymorphism, and yet doesn't result in horrific inefficiency. Do we
have a proof (or at least strong evidence) that such a thing can't
exist?

I'm going to think about this some more. I really find a lot of these
solutions to be heavy handed, as you really want things to be
polymorphic by default, and let the programmer or various compiler
optimisations decide when they're only used monomorphically. A special
keyword for killing polymorphic binding might work, but what's so
wrong with just adding a type signature?

 - Cale

 -- sorry if anyone gets two copies of this, I thought I sent it, but
later received notification that it wasn't sent.


More information about the Haskell-prime mailing list