[m-rev.] For review: add reference in "Promising purity" section
Ralph Becket
rafe at csse.unimelb.edu.au
Fri May 25 12:39:57 AEST 2007
Estimated time taken: 0.1
Branches: main
doc/reference_manual.texi:
Add a reference to the promise_purity scopes described in
the `Goals' section of the reference manual, from the
`Promising purity' section.
Index: reference_manual.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/reference_manual.texi,v
retrieving revision 1.390
diff -u -r1.390 reference_manual.texi
--- reference_manual.texi 4 Apr 2007 04:38:49 -0000 1.390
+++ reference_manual.texi 25 May 2007 02:35:16 -0000
@@ -9139,12 +9139,16 @@
Programmers should be very careful about mixing code that is promised
pure with impure predicates or functions that may manipulate the
same hidden state (for example, the impure predicates used to implement
-a predicate that is promised pure); the @samp{promise pure} declaration
+a predicate that is promised pure); the @samp{promise_pure} declaration
is supposed to promise that impure code cannot change the declarative
semantics of pure code. The module system can be used to minimize the
possibility of making errors with such code, by keeping impure
predicates or functions behind the interface where code is promised
pure.
+
+Note that @code{promise_purity} pragmas are largely redundant due to
+the @samp{promise_pure}, @samp{promise_semipure}, and @samp{promise_impure}
+casts described in @ref{Goals}.
@node Impurity Example
@section An example using impurity
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list