New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug in structural equality #3322
Comments
Comment author: administrator
Both. The specification of (=) has changed slightly between 3.07 and 3.08. Note that the 3.08 spec is included in 3.07, so any program that was correct There is in 3.08 a function that has the same behaviour (=) had in 3.07: -- Damien |
Comment author: administrator C'est ce que j'ai remarqué dans la doc CAML mais il faudrait peut-être le Le problème en effet est que c'est trop tard si on detecte le bug à La solution que j'ai choisit , c'est de surcharger le module Pervasives en Est-ce qu'il y aurait un moyen à la compil et non à l'exécuction de Daniel Weil Damien Doligez caml-bugs@pauillac.inria.fr Objet
Both. The specification of (=) has changed slightly between 3.07 and Note that the 3.08 spec is included in 3.07, so any program that was There is in 3.08 a function that has the same behaviour (=) had in 3.07: -- Damien
> type t = {a : t};; > let rec x = {a = x};; > x = x > > In 3.07, compiler terminates and answer true > > In 3.08, compiler never terminates!!! > > Which compiler has the right answer ? Both. The specification of (=) has changed slightly between 3.07 and 3.08. In 3.07, "Equality between cyclic data structures may not terminate." In 3.08, "Equality between cyclic data structures does not terminate." Note that the 3.08 spec is included in 3.07, so any program that was correct in 3.07 is still correct in 3.08. But the 3.08 behaviour exposes some bugs in your programs that were hidden by 3.07. There is in 3.08 a function that has the same behaviour (=) had in 3.07: Pervasives.compare. -- Damien ---------------- ---------------- |
Original bug ID: 3322
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Related to: #4715
Bug description
Full_Name: Daniel Weil
Version: 3.08.2
OS: Windows
Submission from: 81.80.88.226 (81.80.88.226)
There is a difference of behavior between 3.07 and 3.08 release of OCaml if you
type this in the Ocaml interpreter:
type t = {a : t};;
let rec x = {a = x};;
x = x
In 3.07, compiler terminates and answer true
In 3.08, compiler never terminates!!!
Which compiler has the right answer ?
The text was updated successfully, but these errors were encountered: