caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Changes on equality between 3.06 and 3.08.3
@ 2005-04-28 10:02 Olivier Michel
  2005-04-28 16:29 ` [Caml-list] " Damien Doligez
  2005-04-28 16:41 ` Alex Baretta
  0 siblings, 2 replies; 6+ messages in thread
From: Olivier Michel @ 2005-04-28 10:02 UTC (permalink / raw)
  To: caml-list; +Cc: the MGS project

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 :


////////////////////////////////////////////////////////////////////////////////
//
//release 3.06
//

dellfp-3 7 > /ocaml
        Objective Caml version 3.06

# type toto = { b : int -> int; } ;;
type toto = { b : int -> int; }
# let a = { b = (fun x -> x) } ;;
val a : toto = {b = <fun>}
# a = a;;
- : bool = true


//
//release 3.08.3
//


dellfp-3 8 > ocaml
        Objective Caml version 3.08.3

# 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 ?

Best regards,
Olivier.

--
Olivier MICHEL                       Email : michel@lami.univ-evry.fr
Universite d'Evry Val d'Essonne      http  : www.lami.univ-evry.fr/~michel
Equipe Specif / Projet MGS           http  : mgs.lami.univ-evry.fr
LaMI - UMR 8042 du CNRS              Phone : +33 (0)1.60.87.39.10
523, place des terrasses de l'agora  Fax   : +33 (0)1.60.87.37.89
91000 Evry - FRANCE


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-04-28 18:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-28 10:02 Changes on equality between 3.06 and 3.08.3 Olivier Michel
2005-04-28 16:29 ` [Caml-list] " Damien Doligez
2005-04-28 16:41 ` Alex Baretta
2005-04-28 17:06   ` Olivier Andrieu
2005-04-28 18:20     ` Marcin 'Qrczak' Kowalczyk
2005-04-28 18:23     ` Jon Harrop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).