Hello Gabriel,

thank you for your much useful answer!

Gabriel Scherer wrote:
When you seal a module with a signature that has an abstract type (the
type ('a xarray) in the XARRAY signature), you get a "fresh" abstract
type is a result.
I think I did not analyse adequately the situation because I overlooked the fact you pinpoint here. I thought I knew this, but I probably implicitly assumed that the result of `module type of XArray` (my original code used this) was annotated with concrete type definitions. But it does not work like this, and it is not expected to do so!

As you might guess I am now trying out the new features of OCaml 3.11, and the `include module type of` mantra together with destructive substitution in signatures is makes the implementation of inheritance mechanisms for modules much easier. Something else I am very excited about is first class modules!

Best Regards,
Michael


--
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

Reply via email to