The explanation in Section 8.21 Generative Functors of the OCaml Manual gives the impression that using
struct end as functor argument make a functor generative. The code below makes me suspect that any functor argument that is not a named module makes a functor generative. What are the details here?
module X (E: sig type x end): sig type t val t: t end = struct type t = int let t = 0 end module X1 = X (struct type x = int end) module X2 = X (struct type x = int end) module E = struct type x = int end module X1' = X (E) module X2' = X (E)
X2.tare incompatible – X is generative
X2'.tare compatible – X is not generative