Re: a proposal featuring a bug

From: Bernd Brassel <bbr_at_informatik.uni-kiel.de>
Date: Mon, 11 Dec 2006 09:53:43 +0100

Sebastian Hanowski wrote:
>
> That's a very descriptive coding of need-time-choice non-determinism.
> But it also imposes a finiteness restriction on the argument, for
> example it won't give us
>
> Tree (Tree Color)

Yes, that's it! I should have read this one before replying to Sergio's
mail.

> _at_Bernd Brassel:
>> type Generator a = () -> a
>>
>> Tree :: Generator a -> Generator (Tree a)
>> Tree a _ = Leaf ? Node (a ()) (Tree a ()) (Tree a ())
>
> That seems to do the trick. But it looks like it's done in call-by-value
> languages, delaying the evaluation of an expression by hiding it under a
> lambda. Maybe that's why I didn't come to think of doing this with
> call-by-need Curry.
> I had just liked to shove the overhead of wrapping arguments with
> functions once and forall from application to definition.

Wolfgang lux once proposed a function "clone" in this mailing list. This
was essentially the function you would need to use Sergio's scheme and
get the result you want. And the kics compiler, which release is soon to
be announced here, has a mode in which free variables are implemented
this very same way.

Greetings
Bernd

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mo Dez 11 2006 - 10:15:55 CET

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