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 96739BB84 for ; Sat, 24 May 2008 00:25:20 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0BAJLhNkjAXQIniGdsb2JhbACBVZBkAQEBDyCcNg X-IronPort-AV: E=Sophos;i="4.27,532,1204498800"; d="scan'208";a="12640106" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 24 May 2008 00:25:20 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m4NMPJWP007143 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 24 May 2008 00:25:19 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An0AAN/gNkjUnvgImWdsb2JhbACBVZBkAQEBAQEIBQYJEQOcLQ X-IronPort-AV: E=Sophos;i="4.27,532,1204498800"; d="scan'208";a="26557472" Received: from smtp.dslgb.com (HELO mcr-smtp-002.bulldogdsl.com) ([212.158.248.8]) by mail4-smtp-sop.national.inria.fr with ESMTP; 24 May 2008 00:25:19 +0200 Received: by mcr-smtp-002.bulldogdsl.com (Postfix, from userid 1010) id 8C8E3845AB4; Fri, 23 May 2008 23:25:18 +0100 (BST) Received: from [192.168.123.191] (host-84-9-233-195.dslgb.com [84.9.233.195]) by mcr-smtp-002.bulldogdsl.com (Postfix) with ESMTP id 18BF684591F; Fri, 23 May 2008 23:25:16 +0100 (BST) Message-ID: <4837444A.4020303@ed.ac.uk> Date: Fri, 23 May 2008 23:25:14 +0100 From: Jeremy Yallop User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509) MIME-Version: 1.0 To: Fabrice Marchant Cc: caml-list@inria.fr Subject: Re: [Caml-list] A functor to produce recursive modules ? References: <20080522225830.52208601@orange.fr> <483661D2.9040301@frisch.fr> <20080523214205.769b7788@orange.fr> In-Reply-To: <20080523214205.769b7788@orange.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4837444F.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 val:01 struct:01 ocaml:01 bug:01 48,:98 wrote:01 Fabrice Marchant wrote: > 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. This doesn't appear to require recursive modules, since ModSet is not used within Mod. Except for the missing "compare" (in your version), it's equivalent to the following: module F ( X : Set.OrderedType ) = struct module 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 val compare : t -> t -> int end = struct module XSet = Set.Make( X ) module XMap = Map.Make( X ) type elt = X.t type t = XSet.t XMap.t let compare = XMap.compare XSet.compare end module 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)" I agree with Till that you should report this bug. Jeremy.