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 QAA22653; Mon, 16 Jul 2001 16:46:15 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA22680 for ; Mon, 16 Jul 2001 16:46:04 +0200 (MET DST) Received: from moutvdom01.kundenserver.de (moutvdom01.kundenserver.de [195.20.224.200]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f6GEk3107980 for ; Mon, 16 Jul 2001 16:46:03 +0200 (MET DST) Received: from [195.20.224.209] (helo=mrvdom02.schlund.de) by moutvdom01.kundenserver.de with esmtp (Exim 2.12 #2) id 15M9dL-0003Ii-00 for caml-list@inria.fr; Mon, 16 Jul 2001 16:46:03 +0200 Received: from [62.154.173.138] (helo=pc022.bln.elmeg.de) by mrvdom02.schlund.de with esmtp (Exim 2.12 #2) id 15M9bZ-0004P1-00 for caml-list@inria.fr; Mon, 16 Jul 2001 16:44:13 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] exceptions and the polymorphic equality References: <20010715220500D.sumii@yl.is.s.u-tokyo.ac.jp> From: Nils Goesche Date: 16 Jul 2001 16:44:03 +0200 In-Reply-To: <20010715220500D.sumii@yl.is.s.u-tokyo.ac.jp> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk eijiro_sumii@anet.ne.jp writes: > I have a question about the polymorphic equality and exceptions: it > seems to me that the behaviour of "=" is counter-intuitive with > respect to pattern matching of exceptions, for example as follows. > > Objective Caml version 3.01 > > # exception Foo;; > exception Foo > # let e = Foo;; > val e : exn = Foo > # exception Foo;; > exception Foo > # let e' = Foo;; > val e' : exn = Foo > # e = e';; > - : bool = true > # match e with Foo -> true | _ -> false;; > - : bool = false > # try raise e with Foo -> ();; > Uncaught exception: Foo. > # > > I know that the two Foo's above should be distinct, but then shouldn't > e = e' also return false? Is this issue well known? I can't see any ``issue'' here: # e == e';; - : bool = false # try raise e with e -> ();; - : unit = () Isn't that just fine? Regards, -- Nils Goesche "Don't ask for whom the tolls." PGP key ID 0x42B32FC9 ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr