[m-rev.] Extended the promise_<purity> scopes

Julien Fischer juliensf at cs.mu.OZ.AU
Tue Apr 26 13:43:59 AEST 2005


On Tue, 26 Apr 2005, Ralph Becket wrote:

> Estimated hours taken: 2
> Branches: main
>
> Extend the promise_<purity> scopes.
>
> compiler/hlds_goal.m:
> 	Added some comment lines to the scope_reaon documentation to
> 	make it clear to which constructor each comment pertains.
>
> compiler/prog_io_goal.m:
> compiler/purity.m:
> library/ops.m:
> 	Added promise_impure as a scope.
>
> 	Added promise_{pure,semipure,impure}_implicit scopes.  These are
> 	identical to promise_{pure,semipure,impure} respectively, except that
> 	purity annotations on goals within the scope are optional.
>
> 	Purity warnings are no longer issued if the scope body has a lesser
> 	impurity than the promised purity.  To make this work, I've added a
> 	field `implicit_purity' to the purity_info constructor, which is either
> 	`make_implicit_promises' or `dont_make_implicit_promises'.  If the
> 	latter, then purity errors and warnings are suppressed.
>
> tests/hard_coded/Mmakefile:
> tests/hard_coded/test_promise_impure_implicit.m:
> tests/hard_coded/test_promise_impure_implicit.exp:
> 	Added a test case.
>
You'll also need to update the reference manual.

Julien.
--------------------------------------------------------------------------
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