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
Working on dependent projects with ocamlbuild
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] Working on dependent projects with ocamlbuild

I'm now trying to do something a little bit more complex but fail to  
solve it in the simple way I mentionned (maybe it is not possible). I  
still have the same setup of two independent projects each depending  
on a base project.


The base project is structured as follows :


with as follows

module A = A
module B = B
val ...

The idea is that can access things in that users of the  
base project should not access. What I used to do is to  
appropriatlely constrain the signatures of A and B in base.mli and  
then create in a directory :

dest/base.cma (containing a.cmo b.cmo base.cmo)

Thus forcing access to A and B via the constrained signature Base.A  
and Base.B.

But if I use the approach mentionned in my initial posting users of  
base will see the unconstrained a.cmi and b.cmi. Is there a way that  
allows me to use this approach while maintaining the abstraction I  
get with cma's ? Even if it means plugins in p1 and p2 ? I have the  
impression that the response is negative because even if I try to  
build a .cma with a mllib the build directory with have all .cmi and  
the compilers will look at them.

Thanks for your answers,