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
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: 2007-11-01 (10:53)
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 base.ml as follows

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

The idea is that b.ml can access things in a.ml 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,