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 AAA17204; Tue, 28 Sep 2004 00:32:29 +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 AAA21329 for ; Tue, 28 Sep 2004 00:32:28 +0200 (MET DST) Received: from smtp-bedford.mitre.org (smtpproxy1.mitre.org [192.160.51.76]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i8RMWRaF018836 for ; Tue, 28 Sep 2004 00:32:28 +0200 Received: from smtp-bedford.mitre.org (localhost.localdomain [127.0.0.1]) by smtp-bedford.mitre.org (8.11.6/8.11.6) with SMTP id i8RMWRs17647 for ; Mon, 27 Sep 2004 18:32:27 -0400 Received: from smtp-bedford.mitre.org (localhost.localdomain [127.0.0.1]) by smtp-bedford.mitre.org (Postfix) with ESMTP id E9ECFBF7C for ; Mon, 27 Sep 2004 18:32:26 -0400 (EDT) Received: from MAILHUB1 (mailhub1.mitre.org [129.83.20.31]) by smtp-bedford.mitre.org (8.11.6/8.11.6) with ESMTP id i8RMWQr17627 for ; Mon, 27 Sep 2004 18:32:26 -0400 Received: from mm125609-pc.mitre.org (129.83.35.110) by mailhub1.mitre.org with SMTP id 9657730; Mon, 27 Sep 2004 18:32:26 -0400 Message-ID: <415894F7.1060205@mitre.org> Date: Mon, 27 Sep 2004 18:32:23 -0400 From: Shaddin Doghmi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: caml-list@inria.fr Subject: [Caml-list] unexpected functor behavior in 3.08.1 compiler Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 415894FB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; unexpected:01 functor:01 unexpected:01 functor:01 ocamlc:01 ocamlopt:01 3.07:01 bug:01 struct:01 functors:01 compiler:01 compiler:01 behaviour:01 behaviour:01 modules:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I am experiencing unexpected functor behaviour using the 3.08.1 compiler (both ocamlc and ocamlopt). The 3.07+2 compiler works great and does not have this problem. I am wondering if it is a known bug, despite the fact that i was not able to replicate this behaviour with a small example(it only happens in a large project im working on, and only in 3.08.1). In a functor: module A(B:Bsig) = struct module B =B open B let x=B.name let y = name end when i make two instances of functor A using two different input modules B1 and B2 A1=A(B1) A2=A(B2) i sometimes find that A2.y refers to B1.name as opposed to B2.name , while A2.x correctly refers to B2.name . Hence, it seems that using the open statement when creating A2 is "opening" B1 as opposed to B2 ..... for some reason i wasnt able to replicate this behaviour in a small example, so i dont know under exactly what circumstances this happens.... has anybody else seen this kind of behaviour before? does it have anything to do with how open is defined inside functors? ------------------- 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