Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004765OCamlOCaml generalpublic2009-04-06 15:472013-11-13 15:04
Reportertill 
Assigned Tofrisch 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.11.0 
Target Version4.02.0+devFixed in Version4.02.0+dev 
Summary0004765: Structural equality should treat exception specifically
Descriptionlet e = Not_found
let eq = function Not_found -> true | _ -> false
exception Not_found
let _ = e = Not_found (* True *)
let _ = eq Not_found (* False *)
Additional InformationIMHO The pattern matching behaviour seems to be the correct one. I guess the fix would be to change the equality function to handle exceptions specifically (i.e. do pointer equality on the first field).
This might require adding a new tag number for exceptions to be able to tell them apart at run time.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0007864)
xleroy (administrator)
2012-08-02 08:58

As the reporter says, significant changes in the representation of exceptions are required to address this issue: either reserve a new tag for by-address comparison, or use Object-tagged blocks for exceptions. Postponing to the next major release (optimistically).
(0009727)
frisch (developer)
2013-07-09 13:03

Postponing again.
(0010522)
frisch (developer)
2013-10-23 16:48

Commit 14239 on the raise_variants branch modifies the representation of exception slots, reusing the existing unique id machinery from object values.
(0010631)
frisch (developer)
2013-11-13 15:04

raise_variants branch has been merged into trunk (rev 14289).

- Issue History
Date Modified Username Field Change
2009-04-06 15:47 till New Issue
2009-04-29 15:52 doligez Status new => acknowledged
2012-07-11 14:55 doligez Target Version => 4.01.0+dev
2012-07-31 13:36 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-08-02 08:58 xleroy Note Added: 0007864
2012-08-02 08:58 xleroy Severity minor => feature
2012-08-02 08:58 xleroy Target Version 4.00.1+dev => 4.01.0+dev
2013-07-09 13:03 frisch Note Added: 0009727
2013-07-09 13:03 frisch Target Version 4.01.0+dev => 4.02.0+dev
2013-07-12 18:15 doligez Target Version 4.02.0+dev => 4.01.1+dev
2013-10-23 16:48 frisch Note Added: 0010522
2013-10-23 16:48 frisch Assigned To => frisch
2013-10-23 16:48 frisch Target Version 4.01.1+dev => 4.02.0+dev
2013-11-13 15:04 frisch Note Added: 0010631
2013-11-13 15:04 frisch Status acknowledged => resolved
2013-11-13 15:04 frisch Fixed in Version => 4.02.0+dev
2013-11-13 15:04 frisch Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker