Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Keiko Nakata <keiko@kurims.kyoto-u.ac.jp>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] recursive modules: Cannot safely evaluate the definition
Date: Sat, 05 Apr 2008 00:45:16 +0900 (JST)	[thread overview]
Message-ID: <20080405.004516.46634800.keiko@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <wwu63uxd4p2.fsf@tandem.cs.ru.nl>

Thank you for the correction and citation.

>    Keiko Nakata wrote:
>    > I think that functors cannot be recursive in the current OCaml.

Yes, I was incorrect.
We have: 

module rec F: functor (X:sig end) -> sig val f : int -> int end = 
  functor(X:sig end) -> struct  
    let f x = if x = 0 then 0 else M.f (x-1)
  end

and M : sig val f: int -> int end = F(M)

This should imply interesting examples are available. 

Best,
Keiko


  reply	other threads:[~2008-04-04 15:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04  8:44 Hendrik Tews
2008-04-04  9:00 ` [Caml-list] " Keiko Nakata
2008-04-04 12:44   ` Jean-Christophe Filliâtre
2008-04-04 15:23     ` Hendrik Tews
2008-04-04 15:45       ` Keiko Nakata [this message]
2008-04-04 16:17         ` Sebastien Ferre

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=20080405.004516.46634800.keiko@kurims.kyoto-u.ac.jp \
    --to=keiko@kurims.kyoto-u.ac.jp \
    --cc=caml-list@yquem.inria.fr \
    /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