Further refining the signature of a nested module in the signature of the parent
问题 I have an ML file which contains a nested module. For example: let f n = n + 1 module type M_type = sig val g : int -> int val h : int -> int end module M : M_type = struct let g n = n + 2 let h n = n + 3 end let j n = n |> M.h |> M.g |> f When writing an MLI for this ML, I wish not to expose M.h , but I do wish to expose M.g . Such as the following: module type M_type = sig val g : int -> int end module M : M_type val j : int -> int The above combination of ML and MLI does not compile. The