[m-rev.] For review: change the way we handle inst any non-locals in negated contexts (again)

Mark Brown mark at cs.mu.OZ.AU
Thu Dec 15 23:59:03 AEDT 2005


On 15-Dec-2005, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> 
> On Thu, 15 Dec 2005, Mark Brown wrote:
> 
> > On 15-Dec-2005, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> > > Failing that, I think we should just introduce promise_(semi)pure
> > > declarations in place of the pragmas
> >
> > That's fine by me.  I take it they would look exactly like the pragmas,
> > except without the "pragma".
> >
> Yes, assuming that actually works with the current parser.

Please don't make me think about the implementation details too much.  ;-)

> 
> > > and not bother putting promise_*
> > > annotations on the pred decls.
> >
> > These I still want.  Currently, and in the new proposal, this is where
> > the "impure" or "semipure" annotations go.  A key feature of the new
> > system is that, where we used to require an "impure" or "semipure"
> > annotation on goals, we now also allow a promise instead (*).  I'd like
> > this to apply to the declarations as well, so that the way you use
> > annotations in the declaration is the same as how you use them in the
> > clauses.
> >
> 
> The impression I received further back in this thread was that we didn't
> want to allow the promise_* annotations on the predicate declarations
> for exported predicates.

No, we just didn't want to *require* them.  They would still be allowed
on exported or non-exported declarations alike -- the compiler should still
accept them -- but as Ralph pointed out it would generally be bad style
to actually use them on interface declarations (in the same way that it
would be bad style to expose implementation details in any of the numerous
other ways that would be possible).

> I am opposed to the idea of allowing them
> on local pred declarations but not on exported ones.

I agree that the acceptability of pred/func declarations should not depend
on whether they are exported.

> In that case
> I would just prefer that we have separate promise_(semi)pure
> declarations and not allow promise_(semi)pure declarations on predicate
> declarations at all

Perhaps you're right.  The argument for them is that the "promise"
annotations can replace the "non-promise" annotations on goals, so they
should also be allowed to do the same thing for declarations.  And also
they are kinda concise.

The argument against them (correct me if I'm wrong) is that there would then
be two different means to achieve the same end, and one of these means
could be used in a way that is bad style.

I still prefer the former.  Anyone else want to take sides?

> (lambda expressions would be okay though).

(Agreed.)

Cheers,
Mark.

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list