[m-rev.] for review: use typeclass constraints to help resolve overloading

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jan 22 06:17:49 AEDT 2002


On 21-Jan-2002, David Jeffery <dgj at miscrit.be> wrote:
> Indeed, but this is because the reference manual isn't precise enough about
> how overloading works.
...
> This change brings the situation closer to "what you'd expect" given the
> reference manual.

I disagree; I think the reference manual _is_ precise about how
overloading works.  The problem with the documentation is that for
programs using type classes and/or existential types, the reference
manual's precise description of how overloading is supposed to be resolved
doesn't match what the compiler actually does, and nor does it match what
we want it to do.  The precise description (which is in the section on
"Predicate and function type declarations" in the "Types" chapter) effectively
says that overloading does not take type class constraints into account at all.

> Yes, the reference manual needs to be fixed, but I
> don't think that it's fair to ask Pete to do that fix as part of this
> change.

Here I agree entirely.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list