From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id E97A8BC6B for ; Thu, 1 Nov 2007 11:53:25 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHJMKUfDuhNCnmdsb2JhbACOXwEBAQEHBAYHChg X-IronPort-AV: E=Sophos;i="4.21,357,1188770400"; d="scan'208";a="5346256" Received: from mail22.bluewin.ch ([195.186.19.66]) by mail3-smtp-sop.national.inria.fr with ESMTP; 01 Nov 2007 11:53:25 +0100 Received: from [192.168.1.58] (85.2.1.129) by mail22.bluewin.ch (Bluewin 7.3.121) id 471B461B0028502E for caml-list@yquem.inria.fr; Thu, 1 Nov 2007 10:53:24 +0000 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <7BE597C9-3EF8-4DF4-946F-826FF312A256@erratique.ch> References: <7BE597C9-3EF8-4DF4-946F-826FF312A256@erratique.ch> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <12B29D95-87FB-43F1-A26F-6128EB41FDF5@erratique.ch> Content-Transfer-Encoding: 7bit From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Subject: Re: [Caml-list] Working on dependent projects with ocamlbuild Date: Thu, 1 Nov 2007 11:53:44 +0100 To: caml-list caml-list X-Mailer: Apple Mail (2.752.2) X-Spam: no; 0.00; bunzli:01 buenzli:01 mli:01 val:01 mli:01 cmo:01 cmo:01 cmi:01 cmi:01 abstraction:01 signatures:01 compilers:01 caml-list:01 cma:01 cma:01 Hello, 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. base/src p1/src p2/src The base project is structured as follows : base/src/a.ml base/src/b.ml base/src/base.ml base/src/base.mli 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) dest/base.cmi dest/base.mli 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, Daniel