[m-dev.] proposal for promise_pure scope warning
Peter Schachte
schachte at csse.unimelb.edu.au
Tue Apr 15 16:43:25 AEST 2008
Ian MacLarty wrote:
> On Tue, Apr 15, 2008 at 01:50:48PM +1000, Peter Schachte wrote:
>> But the promise
>> still might be correct. The code might destructively modify some data
>> structure in an equivalence-preserving way, eg caching the result of a
>> computation.
>
> But then why wouldn't the called predicate be declared pure in the first
> place?
It could be a general impure predicate to update a data structure in place,
but it might be used in this context to update a cache in an
equality-preserving way.
--
Peter Schachte It is the function of the citizen to keep the
schachte at cs.mu.OZ.AU Government from falling into error.
www.cs.mu.oz.au/~schachte/ -- Robert H. Jackson
Phone: +61 3 8344 1338
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions: mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the developers
mailing list