On 08-Jul-1998, Johannes Waldmann <[EMAIL PROTECTED]> wrote:
...
> how would you resolve ambiguities?
> probably by requiring an explicit type signature
> at the point of usage.
>
> fine, but then i'd like to have this in other cases as well,
> finally arriving at Ada-style overloading
> (a name may have several meanings
> as long as they can be distinguished by their type)
>
> then i could write size :: [a] -> Int; size :: Tree a -> Int,
> and the two things are completely unrelated.
FYI, the logic/functional language Mercury supports exactly that
kind of overloading. I found the Haskell requirement that
every data constructor have a different name quite annoying:
I wound up including the type name in the data constructor names
to ensure uniqueness. This is a pain, because you then end up
effectively type-qualifying *every* occurrence of the data constructors,
rather than only type-qualifying the ones that would otherwise be ambiguous.
--
Fergus Henderson <[EMAIL PROTECTED]> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.