Created
March 19, 2021 07:42
-
-
Save EduardoRFS/ccf3cf4183a46f0449e411b48db57e34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ('a, 'b) eq = Eq : ('a, 'a) eq | |
module type X = sig | |
module type T' | |
module type T = sig | |
module T : T' | |
end | |
type a | |
val eq : (a, (module T)) eq | |
val eq' : (a, (module T')) eq | |
end | |
module rec V : X = struct | |
module type T' = V.T | |
module type T = sig | |
module T : V.T' | |
end | |
type a = (module T) | |
let eq = (Eq : (a, (module T)) eq) | |
let eq' = (Eq : (a, (module T')) eq) | |
end | |
let f : (module V.T') -> (module V.T) = | |
fun packed -> | |
let a : V.a = | |
let Eq = V.eq' in | |
packed | |
in | |
let Eq = V.eq in | |
a | |
let f' : (module V.T) -> (module V.T') = | |
fun packed -> | |
let a : V.a = | |
let Eq = V.eq in | |
packed | |
in | |
let Eq = V.eq' in | |
a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment