English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Private modules in packages
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-05-21 (08:51)
From: Michaël_Grünewald <Michael.Grunewald@l...>
Subject: Re: [Caml-list] Private modules in packages
Hi Hans,
Hans Ole Rafaelsen wrote:

> When packing a set of modules into a top module using -pack, is there 
> a way to have some of the modules private to the package?
> If I have the modules Helper, Foo and Bar. Helper provides helper 
> functions used by Foo and Bar. When I'm packing them into a top mudule 
> P, I do not want to expose the functions of Helper to users of P.
> Is there some way to achieve this?  If not, do anyone know of other 
> ways for packing libraries and keeping some of the modules private to 
> the library?

IIRC you have to write an interface file (MLI) for the package.