From: "Jean-Christophe Filliâtre" <Jean-Christophe.Filliatre@lri.fr>
To: Alexey Rodriguez <mrchebas@gmail.com>
Cc: OCaml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Partially hiding modules in packages
Date: Thu, 10 Sep 2009 08:08:45 +0200 [thread overview]
Message-ID: <4AA897ED.6020705@lri.fr> (raw)
In-Reply-To: <4b39c80a0909091200v7ae57950q4775d4b4ed4a51b3@mail.gmail.com>
Hi,
Alexey Rodriguez a écrit :
> My question is about how to hide modules (or parts thereof) in
> an ocaml package from the outside world (users of the package).
>
> * Add the file foobar.mli which contains the signatures of Foo and Bar
> but hiding
> Foo.unsafe_change. I think it could work, but I would have to repeat
> much of the Foo
> and Bar interfaces. I tried this but it didn't work, ocaml complains
> as follows:
That's the solution we followed in Mlpost (http://mlpost.lri.fr/) and it
works fine (you may have a look at the Makefile.in in mlpost sources).
Indeed, you have to repeat (parts of) the modules interfaces, but since
it is where we put all the ocamldoc documentation, in a single file, it
appears to be a satisfying solution.
--
Jean-Christophe
prev parent reply other threads:[~2009-09-10 6:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-09 19:00 Alexey Rodriguez
2009-09-09 19:40 ` [Caml-list] " blue storm
2009-09-10 12:29 ` Alexey Rodriguez
2009-11-28 18:49 ` Guillaume Yziquel
2009-09-09 20:24 ` Alain Frisch
2009-09-10 6:08 ` Jean-Christophe Filliâtre [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=4AA897ED.6020705@lri.fr \
--to=jean-christophe.filliatre@lri.fr \
--cc=caml-list@inria.fr \
--cc=mrchebas@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