From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA08180; Sun, 15 Aug 2004 19:05:05 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA08108 for ; Sun, 15 Aug 2004 19:05:04 +0200 (MET DST) Received: from smtp-bedford-dr.mitre.org (smtp-bedford-dr-x.mitre.org [192.160.51.65]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i7FH52RM030044 for ; Sun, 15 Aug 2004 19:05:03 +0200 Received: from smtp-bedford-dr.mitre.org (localhost.localdomain [127.0.0.1]) by smtp-bedford-dr.mitre.org (8.11.6/8.11.6) with SMTP id i7FH52J18059 for ; Sun, 15 Aug 2004 13:05:02 -0400 Received: from smtp-bedford-dr.mitre.org (localhost.localdomain [127.0.0.1]) by smtp-bedford-dr.mitre.org (Postfix) with ESMTP id CCF8C4F8FA for ; Sun, 15 Aug 2004 13:05:01 -0400 (EDT) Received: from mailsrv1a (mailsrv1a.mitre.org [129.83.20.110]) by smtp-bedford-dr.mitre.org (8.11.6/8.11.6) with ESMTP id i7FH50J18014 for ; Sun, 15 Aug 2004 13:05:00 -0400 Received: from mitre.org (unity-18-139.mitre.org [129.83.18.139]) by mailsrv1a.mitre.org (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTPA id <0I2H007HWZ9XZK@mailsrv1a.mitre.org> for caml-list@inria.fr; Sun, 15 Aug 2004 13:01:15 -0400 (EDT) Date: Sun, 15 Aug 2004 13:01:07 -0400 From: Shaddin Doghmi Subject: [Caml-list] mutually recursive modules, strange behaviour in signature To: caml-list@inria.fr Message-id: <411F96D3.9020403@mitre.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Miltered: at concorde with ID 411F97BE.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; 3.07:01 struct:01 struct:01 ocaml:01 sig:01 sig:01 rec:01 rec:01 behaviour:01 compile:02 compile:02 modules:02 unbound:02 module:03 module:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk In ocaml 3.07 and 3.08, it seems that in the signature of a module one can not refer to a module type defined in a mutually recursive module. This example does not compile: ------------------------------------- # module rec A: sig module type w=sig end end= struct module type w = sig end end and B: sig module Z(X:A.w):sig end end = struct module Z (X:A.w)=struct end end ;; Characters 131-134: module Z(X:A.w):sig end ^^^ Unbound module type A.w ----------------------------------------------- however, this one does compile just fine: --------------------------------- # module rec A: sig module type w=sig end end= struct module type w = sig end end and B: sig module Z(X:sig end):sig end end = struct module Z (X:A.w)=struct end end ;; ------------------------------- is there a reason why this happens? ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners