| Anonymous | Login | Signup for a new account | 2013-05-22 17:34 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005186 | OCaml | OCaml general | public | 2010-12-01 16:33 | 2012-09-19 14:26 | ||||||
| Reporter | Julien Signoles | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||
| Status | confirmed | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.11.2 | ||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | |||||||||
| Summary | 0005186: Exception aliasing does not preserve abstraction | ||||||||||
| Description | Hello, Consider the following program: ========== exception A let f () = raise A module M : sig exception B end = struct exception B = A end let () = try f () with | M.B -> Format.printf "M.B@." | A -> Format.printf "A@." ========== The output is "M.B" since M.B matches before A. That is consistent with the dynamic semantics of exception aliasing and pattern matching (as far as I understand it) BUT it does not preserve abstraction since the interface of M does not say that M.B is an alias for A. Thus an external user of M cannot expect this behavior. Sadly, I see no way to circumvent this issue (except to add a textual documentation to the interface of M) :-(. | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0008114) doligez (manager) 2012-09-19 14:26 |
I'm not sure this should be considered a bug. Note that the interface of M does not say that M.B is NOT an alias for A, so maybe you shouldn't be surprised when it is. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-12-01 16:33 | Julien Signoles | New Issue | |
| 2011-05-17 20:22 | doligez | Status | new => acknowledged |
| 2012-07-10 17:29 | doligez | Target Version | => 4.01.0+dev |
| 2012-07-31 13:36 | doligez | Target Version | 4.01.0+dev => 4.00.1+dev |
| 2012-09-19 14:26 | doligez | Note Added: 0008114 | |
| 2012-09-19 14:26 | doligez | Status | acknowledged => confirmed |
| 2012-09-19 14:26 | doligez | Target Version | 4.00.1+dev => 4.01.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |