caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: "johannes.kanig" <johannes.kanig@lri.fr>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] ocamlbuild and pack
Date: Tue, 09 Sep 2008 15:51:10 +0200	[thread overview]
Message-ID: <1220967957-sup-6623@ausone.inria.fr> (raw)
In-Reply-To: <926565e50809090638t2649f820sa4447b748e1ac0d5@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]

Excerpts from johannes.kanig's message of Tue Sep 09 15:38:04 +0200 2008:
> Hi List,
> 
> I have the following problem. I have three files, each consisting of one
> line:
> 
> a.ml: type t = float
> b.ml: type t = A.t
> c.ml: include B
> 
> Now I want to put these modules into a pack, but I only want to export A and
> C, so I write a file project.mli:
> module A : sig type t end
> module C : sig type t = A.t end
> 
> As I want to use ocamlbuild, I also create a file project.mlpack:
> A
> C

B should be in the pack even if you want to hide it.

> Now, the command "ocamlbuild project.cmo" works fine, but I can't build a
> library from that:
> ocamlbuild  project.cma
> Circular dependencies: "project.cmo" already seen in
>   [ "b.cmo"; "project.cmo" ]
> 
> There clearly aren't any circular dependencies, are there? Am I missing
> something?

B depends on A, but A is in the pack Project. {B|->Project}
Project includes C, that depends on B. {Project->B}

> The problem goes away if I export B instead of C. So the troublemaker seems
> to be the include directive.

In that case:

* A is in Project {}
* B depends on A that is in Project, but B is also in Project {}
* C depends on B that is in Project {C->Project}

No cycle in this one

-- 
Nicolas Pouillard aka Ertai

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

  reply	other threads:[~2008-09-09 13:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09 13:38 Johannes Kanig
2008-09-09 13:51 ` Nicolas Pouillard [this message]
2008-09-09 14:10   ` [Caml-list] " Johannes Kanig

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=1220967957-sup-6623@ausone.inria.fr \
    --to=nicolas.pouillard@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=johannes.kanig@lri.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).