Version française
Home     About     Download     Resources     Contact us    
Browse thread
Circular dependencies
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Johannes Kanig <johannes.kanig@l...>
Subject: Re: [Caml-list] Circular dependencies
On Mon, Jul 6, 2009 at 12:56 PM, Pietro
Abate<Pietro.Abate@pps.jussieu.fr> wrote:
> ok, so if now I want to hide the module private.ml I need to add
> algo.mli to hide it . Suppose I've the mli for Pub1 Pub2 and Out .  How
> can I easily (without cut and pasting code) create algo.mli ?  Tell me I
> do not have to manually add the signature of Pub1 Pub2 and Out ...
> searching the list I've got a bad feeling ... Is this the best way to
> hide a module ?

I don't know of a solution without changing your code. You could
either remove your internal .mli files and put all the interfaces into
algo.mli. Or you create a file signatures.mli which contains the
relevant signatures. In pub1.mli, you could then write include
Signatures.Pub1, and so on, and similarly for algo.mli.

Johannes

-- 
Johannes Kanig
johannes.kanig@lri.fr