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.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id D0103BBAF for ; Thu, 10 Sep 2009 08:08:46 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AugBABc1qEqBrw8EhWdsb2JhbACbPwEBAQoLCgUVwT6EGAWCRg X-IronPort-AV: E=Sophos;i="4.44,362,1249250400"; d="scan'208";a="35783865" Received: from ext.lri.fr ([129.175.15.4]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 10 Sep 2009 08:08:46 +0200 Received: from localhost (localhost [127.0.0.1]) by ext.lri.fr (Postfix) with ESMTP id 4A4F0A41ED; Thu, 10 Sep 2009 08:08:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at lri.fr Received: from ext.lri.fr ([127.0.0.1]) by localhost (ext.lri.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FW6-X02AZ5dN; Thu, 10 Sep 2009 08:08:46 +0200 (CEST) Received: from [192.168.0.10] (mry91-1-82-229-156-20.fbx.proxad.net [82.229.156.20]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ext.lri.fr (Postfix) with ESMTP id 15213A41EB; Thu, 10 Sep 2009 08:08:46 +0200 (CEST) Message-ID: <4AA897ED.6020705@lri.fr> Date: Thu, 10 Sep 2009 08:08:45 +0200 From: =?ISO-8859-1?Q?Jean-Christophe_Filli=E2tre?= User-Agent: Thunderbird 1.5.0.14ubu (X11/20080925) MIME-Version: 1.0 To: Alexey Rodriguez Cc: OCaml List Subject: Re: [Caml-list] Partially hiding modules in packages References: <4b39c80a0909091200v7ae57950q4775d4b4ed4a51b3@mail.gmail.com> In-Reply-To: <4b39c80a0909091200v7ae57950q4775d4b4ed4a51b3@mail.gmail.com> X-Enigmail-Version: 0.94.2.0 OpenPGP: url=http://www.lri.fr/~filliatr/mykey.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; filliatre:01 filliatre:01 lri:01 ocaml:01 foobar:01 mli:01 foo:01 foo:01 ocaml:01 lri:01 makefile:01 ocamldoc:01 signatures:01 complains:01 caml-list:01 Hi, Alexey Rodriguez a écrit : > My question is about how to hide modules (or parts thereof) in > an ocaml package from the outside world (users of the package). > > * Add the file foobar.mli which contains the signatures of Foo and Bar > but hiding > Foo.unsafe_change. I think it could work, but I would have to repeat > much of the Foo > and Bar interfaces. I tried this but it didn't work, ocaml complains > as follows: That's the solution we followed in Mlpost (http://mlpost.lri.fr/) and it works fine (you may have a look at the Makefile.in in mlpost sources). Indeed, you have to repeat (parts of) the modules interfaces, but since it is where we put all the ocamldoc documentation, in a single file, it appears to be a satisfying solution. -- Jean-Christophe