Browse thread
Re: [Caml-list] forbidden construct as right hand side of "let rec"
-
Damien Guichard
-
Marc de Falco
- blue storm
-
Marc de Falco
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2009-10-23 (17:51) |
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 <marc.defalco@gmail.com> 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 : http://caml.inria.fr/pub/docs/manual-ocaml/manual021.html#toc70 > 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 : http://groups.google.com/group/fa.caml/browse_frm/thread/9aa32076b03dd6ff?pli=1 You can also look at Matias Giovannini's articles on his blogs (wich are recommended reading anyway) : http://alaska-kamtchatka.blogspot.com/2007/11/unsafe-clasp.html http://alaska-kamtchatka.blogspot.com/2007/11/more-elegant-necklace.html