[m-dev.] `highly ambiguous overloading' ??

Ralph Becket rbeck at microsoft.com
Mon Mar 19 21:47:07 AEDT 2001


> From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU] 
> Sent: 16 March 2001 21:59
> 
> The compiler type-checks things left-to-right, and does 
> breadth-first search to resolve ambiguities.  If you have a 
> whole bunch of unifications with an overloaded name like `no' 
> (which is used both in `bool' and in `maybe(T)'), and nothing 
> to resolve the ambiguity, then the current implementation 
> uses up 2^N time and space.  For N > 5 you will get a 
> warning.  Here N = 6.

Is there a document or comment somewhere explaining the decision
to use breadth first?  You could probably do a lot better with
iterative deepening or even just keeping track of the independent
choices for each variable.  I'm not that familiar with what's
going on in that part of the compiler, so these suggestions may
not be applicable.

Ralph
--------------------------------------------------------------------------
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