How overload operator in Haskell?

Andrew J Bromage ajb@spamcop.net
Fri, 11 Jul 2003 17:38:18 +1000


G'day all.

On Thu, Jul 10, 2003 at 11:16:56PM -0700, Ashley Yakeley wrote:

> As written, this is _not_ a good idea. Trust me, you end up having to 
> put type annotations everywhere. Even (3 + 4 :: Integer) is ambiguous, 
> you have to write (3 :: Integer) + (4 :: Integer).

But that's what default() is for!

Cheers,
Andrew Bromage