Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] Default module type?

0 views
Skip to first unread message

Christian Sternagel

unread,
Sep 25, 2008, 8:20:15 AM9/25/08
to caml...@yquem.inria.fr
Hi there,

when I have a file m.ml I can use

include M

in other *.ml files to include the content of m.ml. However, the same
functionality for module types seems not to exist. I have an interface
file m.mli and want to use

include M

within another *.mli file (so that I only have to write the
documentation for module M once, namely in m.mli). But there is no
module type M. Does anyone have the same problem and/or have a solution?

cheers

christian sternagel

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Ashish Agarwal

unread,
Sep 25, 2008, 9:02:16 AM9/25/08
to Christian Sternagel, caml...@yquem.inria.fr
That is correct. You have to define a module type within an ml file, and
then include that. See the following thread on the beginner's list.
http://tech.groups.yahoo.com/group/ocaml_beginners/message/8992

However, I never did find out why. Why does the compiler not create a module
type MySig from an mli file mySig.mli? This would be very convenient.

0 new messages