[m-dev.] Fw: Re: Impurity annotations on clauses
Ralph Becket
rafe at csse.unimelb.edu.au
Tue Jan 23 08:23:55 AEDT 2007
Julien Fischer, Monday, 22 January 2007:
> On Mon, 22 Jan 2007, Mark Brown wrote:
> >Third, situation 7 could be mitigated by adding a higher-order `any' inst
> >to the mode system. There is nothing intrinsically impure about lambda
> >expressions which constrain non-local solver variables, so long as they
> >are not called inside a negated context. The higher-order `any' inst
> >would prevent this from happening without a promise of safety, and
> >therefore
> >the construction of the lambda expression need not be considered impure.
>
> I like this idea, however I'm not sure that with the current mode
> analyser that implementing it is going to be feasible (at least not
> without a lot of work). The same goes for number 6 as well.
We could add a new inst, `fixed_any' (or some better name), which would
be used for these situations where an any value is observed, but not
further constrained; an any can be passed where a fixed_any is
expected, but not the other way around; non-locals with inst any are
treated as though they have inst fixed_any in negated contexts.
This would not be too hard to support in the current mode system.
-- Ralph
--------------------------------------------------------------------------
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