[m-rev.] for review: improve purity documentation
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Mar 6 15:49:21 AEDT 2002
On 06-Mar-2002, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> @item impure
> -Impure predicates may do almost anything, including changing the state of the
> -computation.
> +Impure predicates may perform IO, modify hidden state, and modify the
> +operational semantics of other code. They may not change the
> +declarative semantics of pure code.
I suggest
Impure predicates may perform I/O or modify hidden state,
even if these side effects alter the operational semantics
of other code. However, impure predicates may not change
the declarative semantics of pure code.
> +Programmers should be very careful about mixing code that is promised
> +pure with the impure predicates or functions that may manipulate the
> +same hidden state
s/the impure/impure/
> (for example, the impure predicates used to implement
> +a predicate that is promised pure); the promise pure is supposed to
> +promise that impure code cannot change the declarative semantics of pure
> +code.
s/the promise pure/the @samp{promise pure} declaration/
Otherwise that looks good, thanks.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | 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