Re: Evaluation Annotations (Was Re: Proposal: Relaxing restrictions in Curry

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Wed, 10 Nov 2004 14:02:18 +0100

Herbert Kuchen wrote:
> Bernd Brassel wrote:
> > "rigid" is in my opinion understandable only in the contrast to
> > "flexible". As there is no dual function to the new primitive, I would
> > like to see it called differently. Here are a few suggestions:
> >
> > 1) waitOn - nicely expresses the identity on its argument but might
> > be too operational (on the other hand, we would like to influence only
> > operational behaviour with it)
> >
> > 2) suspendOn - similiar
> >
> > 3) groundVal - returns the ground value of its argument, (not a
> > predicate as it is not called isGrundVal). Might sound like it should
> > compute what ground does in Wolfgangs former mail:
> >
> >> function ground :: a -> a, which (again lazily) ensures that its
> >> result is a ground term
>
> I prefer "wait" (waitFor?) or "ground".

All this sounds too operational for me, except for groundVal
which just describes a property. However, groundVal is not really
appropriate since only the head must be ground. Therefore, I'd like to
propose a further alternative:

nonVar :: a -> a

Similarly to other selectors (e.g., "snd" returns the second component
of a pair), nonVar returns the "non-variable part" of a term,
i.e., the term itself if it is a non-variable. If it is a variable,
it cannot return anything until the variable is known.

I know that nonvar has a bad meaning in Prolog, but I consider
this as a minor issue.

Similarly, rigidSpine should then be called nonVarSpine
which makes sense.

Best regards,

Michael


_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mi Nov 10 2004 - 15:00:41 CET

This archive was generated by hypermail 2.3.0 : Do Jun 20 2024 - 07:15:07 CEST