caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Default module type?
@ 2008-09-25 12:19 Christian Sternagel
  2008-09-25 13:02 ` [Caml-list] " Ashish Agarwal
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Sternagel @ 2008-09-25 12:19 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Default module type?
  2008-09-25 12:19 Default module type? Christian Sternagel
@ 2008-09-25 13:02 ` Ashish Agarwal
  0 siblings, 0 replies; 2+ messages in thread
From: Ashish Agarwal @ 2008-09-25 13:02 UTC (permalink / raw)
  To: Christian Sternagel; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

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.



On Thu, Sep 25, 2008 at 8:19 AM, Christian Sternagel <
christian.sternagel@uibk.ac.at> wrote:

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

[-- Attachment #2: Type: text/html, Size: 2088 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-25 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-25 12:19 Default module type? Christian Sternagel
2008-09-25 13:02 ` [Caml-list] " Ashish Agarwal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).