Structural equality should treat exception specifically #4765
Original bug ID: 4765
let e = Not_found
IMHO 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).
Comment author: @xavierleroy
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).