I figured out one workable solution on my own, but I’d still be interested in others’ opinion.
My solution was to define a module types like so:
module type AType = { type t }
module type A_BType = {
module A : AType
module B : { let x : A.t }
}
Then my Module Function is now:
module Example = (A_B : A_BType) => {
open A_B
...
}
applied like so:
module MyExample = Example({ module A = MyA; module B = MyB })