Type class inference trouble

Ken Shan ken@digitas.harvard.edu
Sat, 17 Feb 2001 01:33:53 -0500


--uQr8t48UFsdbeI+V
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2001-02-16T09:52:41+0100, Lars Lundgren wrote:
> This is ad hoc overloading, and IMHO bad style, at least in haskell. As I
> understand it, haskell type classes were never intended to support this.

Well, whether this is ad hoc overloading depends on whether you find
ad hoc this particular theory of how sentence fragments in natural
language combine with each other...  I don't particularly want to
overload like I can in C++; I just want to overload like people (are
theorized by some linguists to) overload in English.

In any case, I can certainly dump everything (Int, Int->Int->Int, and
whatnot) into a single sum type, and perform my own type checking, but
I'd rather not duplicate the work that Haskell has done for me.  A few
minutes ago I came up with the idea of turning polymorphic types into
non-polymorphic types using sum types, thus allowing polymorphic
values, but I'll have to make things more concrete before I can say
more about this idea.

--=20
Edit this signature at http://rodimus.digitas.harvard.edu/cgi-bin/ken/sig
"The day Microsoft makes something that doesn't suck is probably the day
                   they start making vacuum cleaners" - Ernst Jan Plugge

--uQr8t48UFsdbeI+V
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6jhtRzjAc4f+uuBURAsYmAKCnzZeR05PGt8GIFAc1+nEhQtgpIQCfcZxC
wwbpBUCneLQ30AD3A5yi9oU=
=IfQV
-----END PGP SIGNATURE-----

--uQr8t48UFsdbeI+V--