Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Warp" <warplayer@free.fr>
To: "OCaml" <caml-list@inria.fr>
Subject: [Caml-list] Cross Modules
Date: Tue, 16 Apr 2002 13:21:27 +0200	[thread overview]
Message-ID: <001b01c1e538$d9e50a00$3900a8c0@warp> (raw)

Hi all
I'm currently working on a ocaml program that will enable automatic
compilation of ocaml projects.
After making dependencies, I'm bumping in the following problem :

If you got two modules A and B (both having ml+mli files) and if A calls a
function of B and B calls a function of A then linking is impossible ( both
ocamlc a.cmo b.cmo & ocamlc b.cmo a.cmo will fail ).
But if for example A call a function of B which returns a type declared in A
interface, then you have to call "ocamlc b.cmo a.cmo" and it'll works.

Watching depencies generated by ocamldep, you can't really know in which
case you are, because each time you have :
a.cmo : b.cmi
b.cmo : a.cmi

And sometimes it can be "legal", and some other times not.
I think it would be nice to have either ocamlc sort itself the cmo in the
right order, and raise an error when theses cannot be link, or to have
ocamldep telling us a little more (with some flag turn on) by adding the
.cmo in the dependencies list when there is functions called.

Since now I've written a quite simple algorithm that suppose you're using a
"correct" design so both cases presented in this mail are rejected by
automatic compilation.

Nicolas Cannasse

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2002-04-16 11:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-16 11:21 Warp [this message]
2002-04-16 13:39 ` Hendrik Tews

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='001b01c1e538$d9e50a00$3900a8c0@warp' \
    --to=warplayer@free.fr \
    --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