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 (15:47)
From: Julien Signoles <julien.signoles@g...>
Subject: Re: [Caml-list] Private modules in packages

2010/5/21 Ashish Agarwal <agarwal1975@gmail.com>

> > write a script to generate the P.mli file
> Why do you need Bar.mli and Foo.mli at all? Just write the P.mli only.

If your pack is big, you may want to mask internals of Bar and Foo to others
modules of the pack. Actually, values exported in Bar/Foo but not in P
exactly are the module counterparts of "friend methods" in OO languages.