Version franēaise
Home     About     Download     Resources     Contact us    
Browse thread
Partially hiding modules in packages
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
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