[m-rev.] Solver support for abstract equivalence solver types

Ralph Becket rafe at cs.mu.OZ.AU
Fri Nov 19 11:34:44 AEDT 2004


Julien Fischer, Thursday, 18 November 2004:
> 
> On Wed, 17 Nov 2004, Ralph Becket wrote:
> 
> > compiler/make_hlds.m:
> > 	Fixed a bug whereby the declarations for special preds for imported
> > 	types were incorrectly being module qualified using the name of the
> > 	*importing* module.
> 
> Aren't these generated afresh for each module?  In which case the module
> qualification would be correct.

The problem arose when compiling module b which imports module a,
defining an abstract solver type a.t, and defines equivalence type
b.u == a.t.  During the make_hlds phase the compiler only knows that
a.t is an abstract solver type, it doesn't know what its initialisation
pred is and hence it can't construct a forwarding initialisation pred
for a.t and therefore not for b.u either.

In other words, unification and comparison preds are generated afresh
for each type visible to a module (because they are handled specially),
but initialisation preds aren't.  This seemed the most straightforward
fix.

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