| Anonymous | Login | Signup for a new account | 2013-06-19 21:48 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 | ||||||
| 0005143 | OCaml | OCaml general | public | 2010-09-03 11:25 | 2013-04-23 02:52 | ||||||
| Reporter | montagu | ||||||||||
| Assigned To | garrigue | ||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||
| Status | assigned | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.12.0 | ||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | |||||||||
| Summary | 0005143: module types and type constraints | ||||||||||
| Description | Type constraints are not stable under equivalence of module types. | ||||||||||
| Additional Information | module type S1 = sig type t type u = t end module type S2 = sig type u type t = u end (* S1 and S2 are equivalent signatures, ie. S1 is included in S2 and S2 is included in S1 *) module type S1' = S1 with type t = int (* ok *) module type S2' = S2 with type t = int (* fails *) | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0005651) garrigue (manager) 2010-09-05 02:20 |
I'm afraid this is not a bug. Namely, two module types can mutually convertible without being equal. The specification of constraints is to replace the current manifest type with a new one. If the current manifest type was necessary, this is bound to break something. You can always write: module type S2' = S2 with type t = int and type u = int |
|
(0005652) montagu (reporter) 2010-09-05 11:17 |
No: in 3.12, module type S2' = S2 with type t = int and type u = int fails, whereas module type S2' = S2 with type u = int and type t = int is accepted. |
|
(0009190) garrigue (manager) 2013-04-23 02:52 |
Indeed, but I would rather say that the problem is that the order of with constraints is relevant. Changing this behavior would require changing the algorithm for with constraints, which I believe is part of the specification. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-09-03 11:25 | montagu | New Issue | |
| 2010-09-05 02:20 | garrigue | Note Added: 0005651 | |
| 2010-09-05 11:17 | montagu | Note Added: 0005652 | |
| 2011-05-20 17:47 | doligez | Status | new => acknowledged |
| 2012-06-01 09:26 | garrigue | Assigned To | => garrigue |
| 2012-06-01 09:26 | garrigue | Status | acknowledged => assigned |
| 2012-07-10 18:30 | 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:07 | doligez | Target Version | 4.00.1+dev => 4.01.0+dev |
| 2013-04-23 02:52 | garrigue | Note Added: 0009190 | |
| Copyright © 2000 - 2011 MantisBT Group |