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
Re: [Caml-list] forbidden construct as right hand side of "let rec"
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: blue storm <bluestorm.dylc@g...>
Subject: Re: [Caml-list] forbidden construct as right hand side of "let rec"
On Fri, Oct 23, 2009 at 6:14 PM, Marc de Falco <> wrote:
> I don't know the exact rule, but I guess that on the right-hand side of a
> let rec defining a ground value named foo you can only write a term which
> evaluates to a finite ground term on the currently defined variables + foo.
> That is to say something that evaluates to a finite tree of constructors
> with
> constants or defined variables as leaves.
> Maybe someone more knowledgeable could state the exact rule.

You can find this in the documentation :

> P.S. : the code using Obj is far from a solution as it modifies the existing
> structure
> of the list to add cycling and thus, breaks persistency.

Well, you can easily copy the list before using Obj, wich preserves persistency.

Here is a relevant discussion on the list :

You can also look at Matias Giovannini's articles on his blogs (wich
are recommended reading anyway) :