On 2011/11/10, at 1:29, rossb...@mpi-sws.org wrote: > Vincent Aravantinos wrote: >> This verbosity problem is actually less true since 3.12 with the >> introduction of "module type of": >> >> module A = struct >> ... >> end >> >> module Make_B (X: module type of A) = struct >> ... >> end >> >> Which is then quite close to the "include" version. > > Except that it defeats the whole point of functorizing, because you won't be > able to plug in another module than A anymore (unless A defines no abstract > types, in which case you can get away with it).
This is actually the opposite: "module type of A" gives no equation for the abstract types, so if module A contained an abstract type, you will be able to change it by another abstract one. On the other hand, all concrete types will stay there, and you will have no way to change them even if Make_B doesn't care. Jacques Garrigue -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs