[mercury-users] literature polymorphic recursive calls

Ralph Becket rafe at cs.mu.OZ.AU
Mon Jun 20 23:07:36 AEST 2005


Tom Schrijvers, Monday, 20 June 2005:
> I was hoping for a text that focuses on the inference and explains the
> recursive calls issue.

Ah, in that case the best document might be the source code itself.
Type checking in the Mercury compiler is currently standard
Hindley-Milner with the added complications of also having to resolve
overloading and deal with type classes.  There is an element of breadth-
first search in there, but I can't recall offhand what that's necessary
for.

> Thanks for the information. A constraint-based approach as in Chameleon
> would seem attractive for Mercury, no?

That's one possibility.  The simplest and most attractive one is to use
the approach taken in Stuckey et al's "Type constraint solving for
parametric and ad-hoc polymorphism"
http://www.csse.monash.edu.au/~mbanda/hal/acsc99-hal.ps
but I think we'd want to augment that with a CHR-style approach for type
classes.

-- Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list