Tested on 9fc6355
module type Empty = sig end
module Foo = struct
module type S = Empty
let x = ()
end
module type Foo = Foo.S
module S : sig
val f : (module Foo) -> unit
end = struct
let f (module M : Foo) = ignore M.x
end
This of course does not work - M.x is not available. However, if you try to get the type of Foo on either the val f or let f line, you will see a signature with x, suggesting that it should be available.