caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Ashish Agarwal <agarwal1975@gmail.com>
To: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] ocamldep and module aliases
Date: Wed, 10 Sep 2014 07:06:40 -0400	[thread overview]
Message-ID: <CAMu2m2+CtdjerD2UmzQTGBoQrD1TH3Jkhxb7M8fdhZQDNT3-AQ@mail.gmail.com> (raw)
In-Reply-To: <A9AB5F56-890D-4452-9FC7-76230FA481D4@math.nagoya-u.ac.jp>

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

Thanks for the suggested workaround. I have to figure out how to implement
it. Since I'm using OMake, I can't easily exclude mylib.ml. I have to
either modify OMake's OCaml module or change my build system completely.


On Wed, Sep 10, 2014 at 1:37 AM, Jacques Garrigue <
garrigue@math.nagoya-u.ac.jp> wrote:

> (added link)
> On 2014/09/10 07:21, Ashish Agarwal wrote:
>
> > Is ocamldep 4.02 supposed to support the -no-alias-deps flag too? It
> doesn't, so I'm not sure how to implement the example at the end of Section
> 7.17 [1] on a real library. Specifically, I use omake, which calls
> ocamldep, and I don't see how to avoid it claiming circular dependencies
> even though I've added -no-alias-deps to the compilation flags.
> >
> > [1]
> http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#s%3Amodule-alias
>
> Indeed, this is not supported by ocamldep, and I'm not sure that it would
> do
> much sense to support it fully at this point, as what you need to do is
> going to depend on how you use module aliases.
> If you follow the recipe described in my ML workshop slides [2], what you
> can do is leave your files unmodified (short names both inside and
> outside), and use command line flags for copilation:
>  ocamlopt -no-alias-deps -open Mylib -o mylibA.cmx a.ml
>
> If you do that, just use ocamldep to compute the dependencies without
> mylib.ml, and post-process the results to add a mylib prefix to all file
> names.
>
> Once the common idioms become clearer, we will probably want to add
> some kind of support to ocamldep (to avoid this post-processing).
>
> Jacques Garrigue
>
> [2]   http://www.math.nagoya-u.ac.jp/~garrigue/papers/index.html#modalias
>
>

[-- Attachment #2: Type: text/html, Size: 2501 bytes --]

      reply	other threads:[~2014-09-10 11:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09 22:21 Ashish Agarwal
2014-09-10  5:31 ` Jacques Garrigue
2014-09-10  5:37 ` Jacques Garrigue
2014-09-10 11:06   ` Ashish Agarwal [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=CAMu2m2+CtdjerD2UmzQTGBoQrD1TH3Jkhxb7M8fdhZQDNT3-AQ@mail.gmail.com \
    --to=agarwal1975@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=garrigue@math.nagoya-u.ac.jp \
    /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).