[m-rev.] For review: allow unifications to be delayed across impure goals

Ralph Becket rafe at cs.mu.OZ.AU
Thu Oct 27 13:28:39 AEST 2005


Fergus Henderson, Friday, 21 October 2005:
> 
> Your proposal would change that.  Programmers could no longer rely on
> Prolog-like order of execution for code fragments using impure code.
> They would need to look at the mode declarations of called procedures
> and do in-their-head mode inference in order to figure out the actual
> order of execution.

I discussed this with Zoltan.  I think we have a compromise that will
satisfy both of us: only allow argument unifications from an impure goal
to be deferred until after the impure goal.  That is, given

	Goals1,
	impure p(E1, E2, E3),
	Goals2

then no subgoals from Goals1 may be deferred past the call to p, but
argument unifications for the expressions E1, E2, and E3 can be.  If you
want Prolog style ordering then you simply write your unifications out
by hand as we have to now.

Would this be acceptable?
-- 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