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=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 5EC40BB84 for ; Thu, 5 Jun 2008 22:02:33 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQBAI/jR0jAXQIniGdsb2JhbACBVZAuAQEBDyCYUIYT X-IronPort-AV: E=Sophos;i="4.27,597,1204498800"; d="scan'208";a="13307602" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Jun 2008 22:02:33 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m55K2WjU020365 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 5 Jun 2008 22:02:33 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnUAAI/jR0jUGyobmmdsb2JhbACBVZAuAQEBAQEGBwgHEQOYTYYT X-IronPort-AV: E=Sophos;i="4.27,597,1204498800"; d="scan'208";a="11627054" Received: from smtp1-g19.free.fr ([212.27.42.27]) by mail2-smtp-roc.national.inria.fr with ESMTP; 05 Jun 2008 22:02:32 +0200 Received: from smtp1-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp1-g19.free.fr (Postfix) with ESMTP id 3527F1AB31A for ; Thu, 5 Jun 2008 22:02:32 +0200 (CEST) Received: from localhost.localdomain (c5850-a2-3-62-147-9-110.dial.proxad.net [62.147.9.110]) by smtp1-g19.free.fr (Postfix) with ESMTP id 2F2B91AB2C0 for ; Thu, 5 Jun 2008 22:02:31 +0200 (CEST) Date: Thu, 5 Jun 2008 20:10:10 +0200 From: Fabrice Marchant To: caml-list@inria.fr Subject: Re: [Caml-list] Problem with module inclusion Message-ID: <20080605201010.72782a9f@free.fr> In-Reply-To: <48479769.80609@lri.fr> References: <20080604141959.6e095093@free.fr> <48479769.80609@lri.fr> X-Mailer: Claws Mail 3.2.0 (GTK+ 2.12.9; i486-pc-linux-gnu) X-Face: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Miltered: at concorde with ID 48484658.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; filliatre:01 filliatre:01 lri:01 val:01 val:01 enclosing:01 'int':01 ocaml:01 wrote:01 caml-list:01 int:01 module:03 module:03 let:03 inclusion:04 On Thu, 05 Jun 2008 09:36:09 +0200 Jean-Christophe Filli=E2tre wrote: > You need >=20 > - either to export to_list in signature of XMap above as >=20 > val to_list : 'a t -> (X.t * 'a) list >=20 > and then you'll be able to write StringCounters.XMap.to_list in your > example >=20 > - or to re-export it in module Counters, as >=20 > let to_list =3D XMap.to_list >=20 > and to declare it in signature of module Counters, as >=20 > val to_list : t -> (X.t * int) list >=20 > and then to use it as StringCounters.to_list in your example. >=20 > Hope this helps, It perfectly does ! Thanks a lot. Among the 2 ways you explained, I prefer the former because we haven't to= worry over what is the enclosing module. But maybe specifying 'int' type i= n the later would cause a speeder code ? Regards, Fabrice http://fabrice.marchant.free.fr/siteOCaml/OCaml.html