Browse thread
Partially hiding modules in packages
-
Alexey Rodriguez
- blue storm
- Alain Frisch
- Jean-Christophe_Filliâtre
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2009-09-10 (06:08) |
From: | Jean-Christophe_Filliâtre <Jean-Christophe.Filliatre@l...> |
Subject: | Re: [Caml-list] Partially hiding modules in packages |
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