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.3 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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id D00E3BB84 for ; Fri, 23 May 2008 23:35:28 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0BADnVNkjAXQIniGdsb2JhbACBVZBkAQEBDyCWSoV5 X-IronPort-AV: E=Sophos;i="4.27,532,1204498800"; d="scan'208";a="12977428" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 23 May 2008 23:35:28 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m4NLZSXl005696 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 23 May 2008 23:35:28 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnoHAOjVNkhQDPKSZGdsb2JhbACBVZBXGgQDBAkOBpZDhXk X-IronPort-AV: E=Sophos;i="4.27,532,1204498800"; d="scan'208";a="12639267" Received: from smtp2b.orange.fr ([80.12.242.146]) by mail1-smtp-roc.national.inria.fr with ESMTP; 23 May 2008 23:35:27 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2b23.orange.fr (SMTP Server) with ESMTP id 1E4BF70000AC for ; Fri, 23 May 2008 23:35:27 +0200 (CEST) Received: from localhost.localdomain (Mix-Lyon-109-2-155.w193-250.abo.wanadoo.fr [193.250.19.155]) by mwinf2b23.orange.fr (SMTP Server) with ESMTP id 53C2170000A7 for ; Fri, 23 May 2008 23:35:26 +0200 (CEST) X-ME-UUID: 20080523213526343.53C2170000A7@mwinf2b23.orange.fr Date: Fri, 23 May 2008 21:42:05 +0200 From: Fabrice Marchant To: caml-list@inria.fr Subject: Re: [Caml-list] A functor to produce recursive modules ? Message-ID: <20080523214205.769b7788@orange.fr> In-Reply-To: <483661D2.9040301@frisch.fr> References: <20080522225830.52208601@orange.fr> <483661D2.9040301@frisch.fr> X-Mailer: Claws Mail 3.2.0 (GTK+ 2.12.9; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 483738A0.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; functor:01 recursive:01 recursive:01 orderedtype:01 struct:01 sig:01 sig:01 elt:01 elt:01 struct:01 ocaml:01 48,:98 rec:01 typing:01 exception:01 However, even if the method is clear, I run into problems trying to apply it on these 2 recursive modules : map to sets and a set of map to sets. module F ( X : Set.OrderedType ) = struct module rec Mod : sig module XSet : sig type elt = X.t type t = Set.Make( X ).t end module XMap : sig type key = X.t type 'a t = 'a Map.Make( X ).t end type elt = X.t type t = XSet.t XMap.t end = struct module XSet = Set.Make( X ) module XMap = Map.Make( X ) type elt = X.t type t = XSet.t XMap.t end and ModSet : Set.S with type elt = Mod.t = Set.Make( Mod ) end Got this internal message from ocaml 3.10.1 : "Fatal error: exception Assert_failure("typing/path.ml", 48, 22)" Maybe should the a' type be declared (as XSet.t) ? Any light ? Fabrice