From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 18C44BC37 for ; Sat, 28 Nov 2009 19:49:39 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlACAKb/EEtV2gB4h2dsb2JhbACER5RngmMBAQEKCwgHFacDj2OBL4IuVASJEw X-IronPort-AV: E=Sophos;i="4.47,306,1257116400"; d="scan'208";a="41007290" Received: from emailfrontal1.citycable.ch ([85.218.0.120]) by mail1-smtp-roc.national.inria.fr with SMTP; 28 Nov 2009 19:49:38 +0100 Received: from [192.168.0.12] (unknown [85.218.92.99]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal1.citycable.ch (Postfix) with ESMTPA id 8B09312C101; Sat, 28 Nov 2009 19:49:37 +0100 (CET) Message-ID: <4B1170C7.1070004@citycable.ch> Date: Sat, 28 Nov 2009 19:49:43 +0100 From: Guillaume Yziquel Reply-To: guillaume.yziquel@citycable.ch User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 To: blue storm Cc: Alexey Rodriguez , OCaml List Subject: Re: [Caml-list] Partially hiding modules in packages References: <4b39c80a0909091200v7ae57950q4775d4b4ed4a51b3@mail.gmail.com> <527cf6bc0909091240u3aa0bb40u3186457a33c0636c@mail.gmail.com> In-Reply-To: <527cf6bc0909091240u3aa0bb40u3186457a33c0636c@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; guillaume:01 guillaume:01 indirection:01 -pack:01 foobar:01 foo:01 foobar:01 foo:01 mli:01 val:01 val:01 flatten:01 storm:98 caml-list:01 partially:02 blue storm a =C3=A9crit : >=20 > Regarding your original problem, I've had the same needs and came up > with a slightly different solution : in order to avoid the additional > indirection level related to -pack (Foobar.Foo), is used a flattened > representation by adding a "foobar.ml" file containing only : >=20 > include Foo >=20 > (and possibly include of other modules in the package). Then the > foobarl.mli is : >=20 > type foo_t >=20 > val initial : foo_t > val show : foo_t -> string >=20 > And values can be referred with Foobar.foo, instead of Foobar.Foo.foo. > Of course this is only useful if you don't want the user to see the > internal module hierarchy, wich may not be what you had in mind. Where do you put the foobar.ml? I've been trying it all over, I do not=20 see how you can flatten something that you pack. Do you put foobar.ml at the same level of your directory foobar/, or in=20 you directory foobar/ ? Or am I understanding you wrong? All the best, --=20 Guillaume Yziquel http://yziquel.homelinux.org/