caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: blue storm <bluestorm.dylc@gmail.com>
To: Marc de Falco <marc.defalco@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] forbidden construct as right hand side of "let rec"
Date: Fri, 23 Oct 2009 19:51:05 +0200	[thread overview]
Message-ID: <527cf6bc0910231051v21c5ba9ah46e7e99277176630@mail.gmail.com> (raw)
In-Reply-To: <C1914435-5748-4578-9EEE-1F78D349D9F0@gmail.com>

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


  reply	other threads:[~2009-10-23 17:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-22 22:22 Mathias Kende
2009-10-22 22:34 ` [Caml-list] " Stéphane Glondu
2009-10-22 23:10   ` Lukasz Stafiniak
2009-10-23 15:35     ` Damien Guichard
2009-10-23 16:14       ` Marc de Falco
2009-10-23 17:51         ` blue storm [this message]
2009-10-25 14:11   ` Mathias Kende
2009-10-25 15:03     ` Stéphane Glondu
2009-10-28 16:52 ` Xavier Leroy
2009-10-28 22:44   ` Lukasz Stafiniak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=527cf6bc0910231051v21c5ba9ah46e7e99277176630@mail.gmail.com \
    --to=bluestorm.dylc@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=marc.defalco@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).