[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Damien Doligez <damien.doligez@i...> |
| Subject: | Re: [Caml-list] Changes on equality between 3.06 and 3.08.3 |
On Apr 28, 2005, at 12:02, Olivier Michel wrote:
> I just noticed the following change in Ocaml between release 3.06 and
> 3.08.3, as far
> as equality on records is concerned :
>
> # type toto = { b : int -> int; };;
> type toto = { b : int -> int; }
> # let a = { b = (fun x -> x) } ;;
> val a : toto = {b = <fun>}
> # a = a;;
> Exception: Invalid_argument "equal: functional value".
>
>
> Is this supposed to be a bug, or a feature ? Will future releases of
> Ocaml follow
> the new way of handling equality between records or the old one ?
New feature. Carefully thought out. Well documented. Ultimately
caused
by a strange wart of the IEEE floating-point standards.
You should use the "compare" function if you want the old behaviour.
-- Damien