我试图将以下递归模块拆分为单独的编译单元。具体来说,我希望 B 位于它自己的 b.ml 中,以便能够与其他 A 一起重用它。
module type AT = sig
type b
type t = Foo of b | Bar
val f : t -> b list
end
module type BT = sig
type a
type t = { aaa: a list; bo: t option }
val g : t -> t list
end
module rec A : (AT with type b = B.t) = struct
type b = B.t
type t = Foo of b | Bar …
Run Code Online (Sandbox Code Playgroud)