Anonymous | Login | Signup for a new account | 2019-02-23 07:49 CET | ![]() |
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 | ||||||
0007834 | OCaml | typing | public | 2018-07-31 17:54 | 2018-09-03 06:55 | ||||||
Reporter | lpw25 | ||||||||||
Assigned To | |||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||
Status | new | Resolution | open | ||||||||
Platform | OS | OS Version | |||||||||
Product Version | |||||||||||
Target Version | Fixed in Version | ||||||||||
Summary | 0007834: Problem with constraints, with type, and polymorphic variants | ||||||||||
Description | The following code seems pretty reasonable: module type Q = sig type 'a t constraint 'a = [< `Empty | `Filled of _ ] module type S = sig type 'a t constraint 'a = [< `Empty | `Filled of _ ] end module M : S with type 'a t = 'a t end;; but fails with the following error: Error: In this `with' constraint, the new definition of t does not match its original definition in the constrained signature: Type declarations do not match: type 'a t = 'a t constraint 'a = [< `Empty | `Filled of 'b & 'c & 'd ] is not included in type 'a t constraint 'a = [< `Empty | `Filled of 'b ] Their constraints differ. I haven't dug into this issue properly, but I can see basically how it happens. I'm not really sure there is much we can do to fix it, I suspect it would require comparing the different `&`ed types, and that has been ruled out as a too much of a PITA before. Still I figured it was worth reporting anyway. | ||||||||||
Tags | No tags attached. | ||||||||||
Attached Files | |||||||||||
![]() |
|||
Date Modified | Username | Field | Change |
2018-07-31 17:54 | lpw25 | New Issue |
Copyright © 2000 - 2011 MantisBT Group |