[m-rev.] diff: unique modes for list__reverse

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Oct 24 17:52:19 AEST 2001


On 24-Oct-2001, Michael Day <mikeday at bigpond.net.au> wrote:
> 
> > It's possible to abstract over certain properties of insts, e.g. subtype
> > information.  But completely abstract insts are pretty useless, since
> > there's almost nothing you can do with them (e.g. because the inst
> > in question might be `dead').
> 
> Doesn't the same objection apply to abstract types?  If you have a variable
> of type queue(T) and inst queue(I) for some given T and I, you can pass it
> to a predicate that is expecting a value of that type and inst.

You can't do that if the same variable occurs elsewhere (e.g. later in the
clause), because `I' might be a unique inst.

Also, you can't unify a variable of inst `I' with a fresh variable,
because that could create free-free aliasing.

So fully abstract insts are much more limiting than abstract types.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  | "... it seems to me that 15 years of
The University of Melbourne         | email is plenty for one lifetime."
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- Prof. Donald E. Knuth
--------------------------------------------------------------------------
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