From: Christian Lindig <lindig@gmail.com>
To: ZAN DoYe <zandoye@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] ocamlbuild add unexpected directories to including-dirs while building multi-targets
Date: Sun, 18 Oct 2015 13:05:29 +0200 [thread overview]
Message-ID: <8A8FA8AA-902A-4AF8-ADF8-F211CDE0297D@gmail.com> (raw)
In-Reply-To: <5623788A.2030302@gmail.com>
> On 18 Oct 2015, at 12:46, ZAN DoYe <zandoye@gmail.com> wrote:
>
> On 2015-10-18 17:44, Christian Lindig wrote:
>> I believe you can’t have two modules I (a/i/i.ml and b/i/i.ml) in the project. While the two are in different directories, they are both top-level modules in the language.
> Thanks. I think it's common that two targets contain modules with the same name. e.g. targetA.Init and targetB.Init. each target has a Init module to initialize themself.
> It's be more convenient if ocamlbuild isolates inc-dir for each target.
>
> For now, Do I have to structure my targets as separate ocamlbuild projects?
>
If you want sub-modules A.I and B.I, it would be easiest to implement the respective I inside A and B but not as separate files:
a.ml:
module I = struct
let a = 1
end
let v = I.a
b.ml:
module I = struct
let b = 1
end
let v = I.b
— Christian
prev parent reply other threads:[~2015-10-18 11:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-18 8:18 ZAN DoYe
2015-10-18 9:44 ` Christian Lindig
2015-10-18 11:03 ` ZAN DoYe
2015-10-18 11:12 ` Daniel Bünzli
[not found] ` <5623788A.2030302@gmail.com>
2015-10-18 11:05 ` Christian Lindig [this message]
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=8A8FA8AA-902A-4AF8-ADF8-F211CDE0297D@gmail.com \
--to=lindig@gmail.com \
--cc=caml-list@inria.fr \
--cc=zandoye@gmail.com \
/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