[m-dev.] Module qualification of typeclass methods

Peter Ross peter.ross at miscrit.be
Thu Nov 15 20:56:43 AEDT 2001


Fergus wrote:
> On 15-Nov-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> > On Thu, Nov 15, 2001 at 04:43:39PM +1100, Fergus Henderson wrote:
> > > For cases like extras/complex_numbers, the ambiguity will be
> > > resolved by the types of the arguments.
> >
> > Currently we don't allow overloading of predicates with the same name
> > and arity in the same module.  So assuming the arity is the same I don't
> > see how we would resolve the ambiguity.
>
> The idea is that we would effectively allow overloading of predicates
> with the same name and arity iff the overloading was introduced via a
> `:- include' declaration.
>
But in solving this problem, wouldn't it also solve the problem for
predicates with the same name/arity located in one module.  After all to the
user they appear to come from one module.  It seems a bit strange to me that
we can allow this type of overloading by using a cunning trick, but not
allow it the straight forward way.

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list