caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: Ashish Agarwal <agarwal1975@gmail.com>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] ocamldep and module aliases
Date: Wed, 10 Sep 2014 14:31:14 +0900	[thread overview]
Message-ID: <AF90EF79-B351-4A07-8CD4-A55DE9457332@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <CAMu2m2J8DcYz1K8UDo7xM9TyevPr-7CxOGuOovSbV=0Y7o0QGw@mail.gmail.com>

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, 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

  reply	other threads:[~2014-09-10  5:31 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 [this message]
2014-09-10  5:37 ` Jacques Garrigue
2014-09-10 11:06   ` Ashish Agarwal

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=AF90EF79-B351-4A07-8CD4-A55DE9457332@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=agarwal1975@gmail.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).