Indeed I was missing glennsl technique, with this you can have:
module type AType = {
type t
}
module type BType = {
type t
let x: t
}
module Example = (A: AType, B: BType with type t := A.t) => {
let x = B.x
}
module MyExample = Example({type t = int}, {let x = 2})
That looks pretty close to what you were trying to achieve I think @liamoc.