Re: Proposal for syntax changes in Curry

From: Michael Hanus <hanus_at_informatik.rwth-aachen.de>
Date: Fri, 23 Oct 1998 13:39:19 +0200

Sven Panne wrote:
> IMHO, that's not a problem. Another solution would be to change the
> typing rule for guards to:
>
> To type
> l | g1 = r1
> | ...
> | gn = rn
> type each gi separately, yielding ti. After that, all ti must be
> unifiable to either
> a) Constraint (default).
> b) Bool. In this case, transform the gi = ri to
> i) nested ifs (if i>1), or
> ii) g1 =:= True = r1 (if i=1)
>
> The report does not state the semantics for the case a) with multiple
> guarded rhs yet, but I guess it should be:
>
> l = g1 => r1
> l = ...
> l = gn => rn

Yes, you are completely right. Thanks for pointing out this gap
in the report. I'll add it.
 
> Hmmm, another quite different reading could be
>
> l = choice g1 -> r1
> ...
> gn -> rn
>
> but I didn't think about the consequences of this reading very long...

Right and therefore this is not intended. The choice construct
is intended for use only in programming concurrent reactive systems
and therefore there should be no implicit usage of this construct.

Best regards,

Michael
Received on Fri Oct 23 1998 - 14:43:00 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 20 2019 - 07:15:04 CEST