Version française
Home     About     Download     Resources     Contact us    
Browse thread
Changes on equality between 3.06 and 3.08.3
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alex Baretta <alex@b...>
Subject: Re: [Caml-list] Changes on equality between 3.06 and 3.08.3
Olivier Michel wrote:
> Hi dear ocamlers,
> 
> I just noticed the following change in Ocaml between release 3.06 and 3.08.3, as far
> as equality on records is concerned :
> ..
> # a = a;;
> Exception: Invalid_argument "equal: functional value".

Keep in mind that in 3.06 physical equality (==) implied structural 
equality (=). Now, (=) now longer checks for (==), so no functional 
value can be found to be structurally equal to any other functional 
value. The following line illustrates this point.

# (=) (=) (=);;
Exception: Invalid_argument "equal: functional value".

Actually, an interesting question related to this one is why the 
following line behaves as it does.

# (==) (==) (==);;
- : bool = false


Alex


-- 
*********************************************************************
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. +39 02 370 111 55
fax. +39 02 370 111 54

Our technology:

The Application System/Xcaml (AS/Xcaml)
<http://www.asxcaml.org/>

The FreerP Project
<http://www.freerp.org/>