Am Aug 28, 2009 um 5:02 PM schrieb Sebastian Fischer:
>
> On Aug 28, 2009, at 3:57 PM, Bernd Brassel wrote:
>
>> What are the values of plus(f (0?1)) and plus'(f' (0?1))
>
> In your example no value of type ETC2 a or ETC2' a is ever shared.
> If I understood Wolfgangs proposal correctly, then the annotations
> imply that if a value of the declared data type is shared then the
> annotated arguments are not shared. At least this is how i
> implemented it..
>
> As a consequence, the results of both of your calls are 0 or 2 with
> the explicit sharing library -- like without any annotation.
Okay, then how about the following example: for the declarations
data C a = C ?a
plus (C x) (C y) = x+y
do the following expressions all have the same semantics?
e1 = let x=C (0?1) in plus x x
e2 = let y=0?1 in let x=C y in plus x x
e3 = let y=0?1 in let x=C y in const (plus x x) y
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Fr Aug 28 2009 - 18:15:11 CEST