From: David Teller <David.Teller@univ-orleans.fr>
To: OCaml <caml-list@inria.fr>
Cc: Nicolas Pouillard <nicolas.pouillard@gmail.com>
Subject: OCamlBuild question
Date: Tue, 30 Sep 2008 09:27:11 +0200 [thread overview]
Message-ID: <1222759631.6764.4.camel@Blefuscu> (raw)
Hi everyone,
I'm trying to write a OCamlBuild plug-in to automatically generate
the .mli corresponding to a .mlpack (for documentation purposes).
I've written a [rule] which lets me depend a .mli on the
corresponding .mlpack . From this .mlpack, I can obtain the list of
modules involved in the construction of the pack. Now, I only have to
1. find the corresponding source .mli files
2. find the corresponding .mli.depends files
3. do a topological sort and create the destination .mli .
Part 3 is no problem. On the other hand, I haven't been able to progress
much with parts 1 and 2.
Part 2 requires waiting until the corresponding .mli.depends have been
created, but
* neither [~insert:`bottom] nor [~insert:(`after foo)] seem to help here
* attempting to [build] an ad-hoc list of files somehow extracted from
the mlpack only gives me dependency errors
* attempting [Solve.solve_target] doesn't seem to help any further.
As for part 1, it requires the ability to find which source .ml / .mli
correspond to a given module. I can only assume OCamlBuild offers some
kind of API for this purpose, because I'd rather avoid folding through
the whole tree, resolving [include] directives myself to find a .ml or
a .mli which may be the right file.
Does anyone have suggestions?
Thanks,
David
--
David Teller-Rajchenbach
Security of Distributed Systems
http://www.univ-orleans.fr/lifo/Members/David.Teller
Angry researcher: French Universities need reforms, but the LRU act brings liquidations.
next reply other threads:[~2008-09-30 7:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-30 7:27 David Teller [this message]
2008-09-30 10:40 ` Nicolas Pouillard
2008-09-30 14:49 ` David Teller
2008-09-30 15:12 ` David Teller
2009-02-11 22:26 Ocamlbuild question Matthieu Dubuget
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=1222759631.6764.4.camel@Blefuscu \
--to=david.teller@univ-orleans.fr \
--cc=caml-list@inria.fr \
--cc=nicolas.pouillard@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