[m-rev.] For review: more fixes to impurity

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Dec 1 17:53:13 AEDT 2005


On 18-Nov-2005, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> --- doc/reference_manual.texi	16 Nov 2005 07:02:00 -0000	1.337
...
> +Any call or unification goal containing a non-local variable with inst any that

I suggest s/inst any/inst @samp{any}/

> +appears in a negated context (i.e., in a negation or the condition of an
> +if-then-else goal) must be given an @code{impure} annotation because it may
> +violate referential transparency.

I suggest adding

 This is because Mercury
 implements negation using the standard negation-as-failure approach,
 which is not sound if the negated goal binds any non-local variables.

-- 
Fergus Henderson                    |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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