-
-
Save dinosaure/d6ed452805c30f6eede78517a3a7dcc7 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
module type SA = | |
sig | |
type v | |
type t = { value: v } | |
end | |
module type SB = | |
sig | |
type v | |
module A: SA with type v = v | |
type t = | |
| A of A.t | |
| B | |
end | |
module A (S: sig type v end): SA with type v = S.v = | |
struct | |
type v = S.v | |
type t = { value: v } | |
end | |
module B (S: sig type v end): SB with type v = S.v = | |
struct | |
type v = S.v | |
module A: SA with type v = v = A(S) | |
type t = | |
| A of A.t | |
| B | |
end | |
module type SC = | |
sig | |
module S: sig type v end | |
module B: SB with type v = S.v | |
and module A = A(S) | |
end | |
module C (S: sig type v end): SC with module S = S and module B = B(S) = | |
struct | |
module B = B(S) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment