Summary of changes

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Tue, 23 Nov 2004 18:11:45 +0100

Hi,

since there are no further comments to the discussed proposals,
I'd like to summarize the finally proposed changes to the language
definition to which haven't received serious objections:

1. The primitive "seq" will not suspend if the first argument
   evaluates to a logical variable.

2. A new primitive "ensureNotFree :: a -> a" will be added to
   the prelude. It evaluates its argument to head normal form
   and returns it. It suspends until the result is bound
   to a non-variable term.

3. The following function will be added to the prelude:

   ensureSpine :: [a] -> [a]
   ensureSpine l = case l of
      [] -> []
      (x:xs) -> x : ensureSpine xs

4. Evaluation annotations will be omitted (together with the keywords
   eval, rigid, and choice).

5. As a replacement of "eval choice", the prelude defines
   a new primitive function

   commit :: [(Success,a)] -> a

   that takes a list of constraint/expression pairs and returns
   one of the expressions whose constraint is satisfied
   (without binding variables that are not local to the
   constraint/expression pair).

   (I consider this definition as preliminary; better proposals
   are welcome.)

BTW, as I already mentioned, I don't think that the primitives
ensure... will be often use in application programs.
In my applications it is sufficient to drop all evaluation
annotations and add ensure... calls only in the Port library
(where suspension is really necessary).

Regards,

Michael


_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Di Nov 23 2004 - 18:16:38 CET

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