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
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: Guillaume Yziquel <guillaume.yziquel@c...>
Subject: Re: [Caml-list] Partially hiding modules in packages
blue storm a écrit :
> Regarding your original problem, I've had the same needs and came up
> with a slightly different solution : in order to avoid the additional
> indirection level related to -pack (Foobar.Foo), is used a flattened
> representation by adding a "" file containing only :
>   include Foo
> (and possibly include of other modules in the package). Then the
> foobarl.mli is :
>   type foo_t
>   val initial : foo_t
>   val show : foo_t -> string
> And values can be referred with, instead of
> Of course this is only useful if you don't want the user to see the
> internal module hierarchy, wich may not be what you had in mind.

Where do you put the I've been trying it all over, I do not 
see how you can flatten something that you pack.

Do you put at the same level of your directory foobar/, or in 
you directory foobar/ ?

Or am I understanding you wrong?

All the best,

      Guillaume Yziquel