Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 (18:05)
From: Goswin von Brederlow <goswin-v-b@w...>
Subject: Re: [Caml-list] Private modules in packages
Julien Signoles <> writes:

> Hello,
> 2010/5/21 Ashish Agarwal <>
>     > 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.

But then, if you have methods in Bar and Foo visible inside the pack but
not from outside, you can't just cat Bar.mli and Foo.mli into
P.mli. You need to process it to remove the 'friends' functions.

Doesn't batteries have some script for this?