Two issues with version 0.8.2 of the report

From: Wolfgang Lux <wlux_at_uni-muenster.de>
Date: Fri, 24 Mar 2006 17:02:05 +0100

Dear colleagues,

looking more carefully at the changes in the report, I've found
two (more or less) problematic issues.

The first is that an implicit module header
   module M where
is added to file M.curry when it does not have an explicit header.
This does not mix well with hierarchical modules (at least when the
module hierarchy is mapped onto the file system). For instance, if
a compiler is invoked for file
   A/B/C/D/M.curry
which header should be used for M if it does not have an explicit
header?
   module M where
or
   module A.B.C.D.M where
In the former case, one cannot omit module headers for nested modules,
in the latter case one can only compile the file or load it into the
interpreter from the correct parent directory. At least to me, the
latter
seems overly restrictive.

The other, more important issue is the definition of committed
choice. Looking at the definition of tryone in the report
   tryone g = commit [let x free in (g x,x)]
I notice that this definition will never work in MCC because of
the restriction that a committed choice must not bind variables
which are not local to a constraint/expression pair. Unfortunately,
the variable x in the above is just as non-local as it would be in
   tryone g = let x free in commit [(g x,x)]

I see two options here. One is to introduce special syntax for
committed choice, e.g., a choice expression as in early versions
of the report:
   choice { constraint_1 -> expression_1 [where LocalDefs_1];
            ...
            constraint_n -> expression_n [where LocalDefs_n] }
so that tryone would be defined as follows:
   tryone g = choice { g x -> x where x free }
The other option is to acknowledge the fact that currently no
implementation supports committed choice and leave out any concrete
syntax for committed choice from the report. Instead the report
could say something like "committed choice is under consideration
for inclusion in a future version of the report" until someone
comes up with a working implementation of committed choice.

Regards
Wolfgang


_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Sa Mär 25 2006 - 17:45:17 CET

This archive was generated by hypermail 2.3.0 : Do Feb 01 2024 - 07:15:07 CET