caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: baguasquirrel@gmail.com
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Mutually recursive functions in different modules
Date: Tue, 18 Sep 2007 16:53:54 +0900 (JST)	[thread overview]
Message-ID: <20070918.165354.267963120.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <74cabd9e0709172327g42d34407wc7027db6d8c6fba6@mail.gmail.com>

From: "Arthur Chan" <baguasquirrel@gmail.com>
> Is it possible to have mutually recursive functions in separate modules?
> 
> For example, is it possible for function x in module A to call function y in
> module B and vice versa?
> 
> The reason why I'm asking is because I've written a good bit of my code with
> functors, and now I need to make some of the code mutually recursive, and
> thus, the mutually recursive functions have to be in separate modules.

Recursive modules are available. See the "language extensions" section
of the reference manual.
(Note that this is about exactly what you asked, i.e. recursive
modules, not recursion between compilation units.)

Jacques Garrigue


  reply	other threads:[~2007-09-18  7:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-18  6:27 Arthur Chan
2007-09-18  7:53 ` Jacques Garrigue [this message]
2007-09-18 14:16   ` [Caml-list] " Yitzhak Mandelbaum
2007-09-18 11:17 ` Jean-Christophe Filliatre
2007-09-19  8:44 ` Julien Signoles
2007-09-19 11:40   ` Andreas Rossberg

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=20070918.165354.267963120.garrigue@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=baguasquirrel@gmail.com \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).