Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Misunderstandings about the AST
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-28 (06:42)
From: Loup Vaillant <loup.vaillant@g...>
Subject: Re: [Caml-list] Misunderstandings about the AST
Thank you for your help, I will get back to work.

2007/3/27, Nicolas Pouillard <>:
> On 3/27/07, Loup Vaillant <> wrote:
> > | Pexp_lazy of expression
> > Why does this constructor even exist? Are some specific optimizations made?
> Since the evaluation of the expression is delayed it's not a plain function.

Actually, I knew that.
However, given the following expressions are semantically equivalent:

lazy expr;;
lazy_from_fun (fun () -> expr);;

With "lazy_from_fun" being a plain function,
my point is then to know if they are really equivalent
(e.g. implementation wise), so I can assume
the keyword "lazy" is just syntactic sugar.


PS: Nicolas, Sorry for the double post, I messed up the "reply" button.