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 JAA24619; Mon, 28 Oct 2002 09:34:15 +0100 (MET) 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 JAA25064 for ; Mon, 28 Oct 2002 09:34:15 +0100 (MET) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9S8YE517951 for ; Mon, 28 Oct 2002 09:34:14 +0100 (MET) Received: from imp1-1.pro.proxad.net (imp1-1.pro.proxad.net [212.27.35.86]) by postfix4-1.free.fr (Postfix) with ESMTP id D27BB2495; Mon, 28 Oct 2002 09:34:13 +0100 (CET) Received: by imp1-1.pro.proxad.net (Postfix, from userid 33) id 6BE3B7806A; Mon, 28 Oct 2002 09:34:13 +0100 (MET) To: Alessandro Baretta Subject: Re: [Caml-list] On the equality of functional values Message-ID: <1035794053.3dbcf6850fd90@imp.pro.proxad.net> Date: Mon, 28 Oct 2002 09:34:13 +0100 (MET) From: jeanmarc.eber@lexifi.com Cc: ocaml References: <3DBCD600.2000307@baretta.com> In-Reply-To: <3DBCD600.2000307@baretta.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.42 X-Originating-IP: 193.252.198.95 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk documentation from pervasives.mli (3.06): Look, in particular, at the use of the word "may": external ( = ) : 'a -> 'a -> bool = "%equal" (** [e1 = e2] tests for structural equality of [e1] and [e2]. Mutable structures (e.g., references and arrays) are equal if and only if their current contents are structurally equal, even if the two mutable objects are not the same physical object. Equality between functional values may raise [Invalid_argument]. Equality between cyclic data structures may not terminate. *) Jean-Marc Eber Quoting Alessandro Baretta : > > > David Monniaux wrote: > > On Sun, 27 Oct 2002, Alessandro Baretta wrote: > > > > > > If I remember well, = is implemented by doing first a == (equality of > > pointers) test, and returning true if that test succeeds; otherwise, > > the more complex recursive equality test is performed, which fails > with > > an exception if it encounters functional values. > > > > So if x and y are the same closure, x=y succeeds and yields the true > > value. Otherwise, it throws an exception. > > This is what I suspected. I wonder if this behavior conforms > to specification, or if it is an incidental concequence of > the implementation of (=). > > Alex > > ------------------- > 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 > ------------------- 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