From: Yitzhak Mandelbaum <yitzhak@research.att.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Mutually recursive functions in different modules
Date: Tue, 18 Sep 2007 10:16:31 -0400 [thread overview]
Message-ID: <0EAAD974-1E2B-4540-9219-F6766FAF1ACD@research.att.com> (raw)
In-Reply-To: <20070918.165354.267963120.garrigue@math.nagoya-u.ac.jp>
[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]
Beware, though, that recursive modules cannot contain functors. Nor
can functors be recursive.
On Sep 18, 2007, at 3:53 AM, Jacques Garrigue wrote:
> 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
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
--------------------------------------------------
Yitzhak Mandelbaum
AT&T Labs - Research
http://www.research.att.com/~yitzhak
[-- Attachment #2: Type: text/html, Size: 6130 bytes --]
next prev parent reply other threads:[~2007-09-18 14:15 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 ` [Caml-list] " Jacques Garrigue
2007-09-18 14:16 ` Yitzhak Mandelbaum [this message]
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=0EAAD974-1E2B-4540-9219-F6766FAF1ACD@research.att.com \
--to=yitzhak@research.att.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).