[m-dev.] proposal for promise_pure scope warning

Ian MacLarty maclarty at csse.unimelb.edu.au
Tue Apr 15 14:31:34 AEST 2008

On Tue, Apr 15, 2008 at 01:50:48PM +1000, Peter Schachte wrote:
> Julien Fischer wrote:
>> I think you only want to emit a warning for promise_pure scopes around
>> impure goals that do not have any outputs and have determinism det or
>> cc_multi however.
> That's a lot clearer:  the promise really looks like it must be a lie.  The 
> warning could ask the user to plug in their polygraph equipment into the 
> USB port and prepare to answer a series of questions.  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

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