You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4049 Reporter: Keiko NAKATA Status: closed (set by @xavierleroy on 2006-08-30T12:01:27Z) Resolution: not fixable Priority: normal Severity: minor Version: 3.09.2 Category: ~DO NOT USE (was: OCaml general) Related to:#3476#4615#5302
Bug description
I think the code below should type check, but not in fact.
This may relate to #3476, or I might misunderstanding something.
module A = struct
module B = struct type t let compare x y = 0 end
module S = Set.Make(B)
let empty = S.empty
end
module A1 = A
let _ = A1.empty = A.empty
Best regards,
Keiko
The text was updated successfully, but these errors were encountered:
If you look at the example,
A.S.t is equal to Set.Make(A.B).t
and A1.S.t is equal to Set.Make(A1.B).t
The module type-checker does not know that A.B = A1.B, if only because it doesn't know anything about equalities between modules in general (only about equalities between type components).
This is a known limitation of applicative functors as implemented in OCaml.
(See PR #3476 for another example). I don't think this limitation will ever be lifted in OCaml.
Original bug ID: 4049
Reporter: Keiko NAKATA
Status: closed (set by @xavierleroy on 2006-08-30T12:01:27Z)
Resolution: not fixable
Priority: normal
Severity: minor
Version: 3.09.2
Category: ~DO NOT USE (was: OCaml general)
Related to: #3476 #4615 #5302
Bug description
I think the code below should type check, but not in fact.
This may relate to #3476, or I might misunderstanding something.
module A = struct
module B = struct type t let compare x y = 0 end
module S = Set.Make(B)
let empty = S.empty
end
module A1 = A
let _ = A1.empty = A.empty
Best regards,
Keiko
The text was updated successfully, but these errors were encountered: