How overload operator in Haskell?

Dylan Thurston dpt@math.harvard.edu
Fri, 11 Jul 2003 16:28:19 -0400


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

On Fri, Jul 11, 2003 at 05:38:18PM +1000, Andrew J Bromage wrote:
> G'day all.
>=20
> On Thu, Jul 10, 2003 at 11:16:56PM -0700, Ashley Yakeley wrote:
>=20
> > As written, this is _not_ a good idea. Trust me, you end up having to=
=20
> > put type annotations everywhere. Even (3 + 4 :: Integer) is ambiguous,=
=20
> > you have to write (3 :: Integer) + (4 :: Integer).
>=20
> But that's what default() is for!

Don't be silly: the default mechanism is a very special case that is not
good for general use.  It would make all user-defined numeric types
essentially unuseable, for one thing.

(Unless you have a proposal to make the default mechanism more general?)

Peace,
	Dylan

--wTWi5aaYRw9ix9vO
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/Dx3jVeybfhaa3tcRAlFSAKCUji656DyM+G+XXSBX6ny0da3ZtwCgg0Vb
sBG0nifITthj0w2tEtzP8ZQ=
=0fJf
-----END PGP SIGNATURE-----

--wTWi5aaYRw9ix9vO--