[m-dev.] implicit purity promises

Ian MacLarty maclarty at csse.unimelb.edu.au
Wed Feb 18 11:54:24 AEDT 2009


On Tue, Feb 17, 2009 at 11:55 PM, Julien Fischer
<juliensf at csse.unimelb.edu.au> wrote:
>
> Hi,
>
> promise_{pure,semipure,impure}_implicit were always a nasty
> hack (and a bad idea IMO).  Now that their principle user
> (G12) has moved over to use explicitly threaded state, can
> we please get rid of them?
>

While you're at it, could you get rid of, or at least rename, promise_impure?

For me a "promise" is there to tell the compiler something it cannot
automatically infer.  Purity inference is conservative, so if the
compiler infers a goal is pure then it must be pure unless there is a
bug in the compiler or the user lied somewhere.  The user should never
need to "promise" that a goal is impure.

Could we change it to something like treat_as_impure, or otherwise
just get rid of it?

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