Re: a proposal featuring a bug

From: Wolfgang Lux <wlux_at_uni-muenster.de>
Date: Mon, 11 Dec 2006 12:34:30 +0100

Sebastian Hanowski wrote:

> 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.

Since your mail (despite its subject) lacks a proposal, let me make up
a straw man proposal:

Extend Curry expressions with nullary lambda expressions, i.e. (\ -> e),
and add \ annotations on pattern variables in order to avoid the
introduction
of these ugly auxiliary arguments. The semantics of these extensions
is such
that a nullary lambda expression (\ -> e) is transformed implicitly
into a
function with an unused argument i.e. (\_ -> e) and each annotated
pattern
variable \a is replaced by an expression (a ()) in its scope. Given this
syntax, your example would read

   Tree \a = Leaf ? Node a (Tree a) (Tree a)

and the goal would be

   Node Red (Node Green Leaf Leaf) Leaf =:= Tree \Color

Regards
Wolfgang


_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mon Dec 11 2006 - 12:53:33 CET

This archive was generated by hypermail 2.3.0 : Mon Sep 23 2019 - 07:15:06 CEST