caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Shaddin Doghmi <shaddin@mitre.org>
To: caml-list@inria.fr
Subject: [Caml-list] including signature (mli) in struct (ml)
Date: Wed, 18 Aug 2004 18:52:35 -0400	[thread overview]
Message-ID: <4123DDB3.8010504@mitre.org> (raw)

let us say i have the following functor in a.ml:

module Make(In:sig blah end):Aout =blahblah

and the following functor in b.ml, which takes as input Aout:

module Make(In:Aout):Bout = blahblah

so basically, i have to be able to refer to Aout in b.ml . what im 
having to do is define Aout in a.ml using:

module type Aout = sig blahblah end

and then repeating that definition in a.mli in order to export Aout so i 
can refer to it in b.ml

this redundancy can be annoying, is there a way to declare Aout only 
once and still be able to refer to it in b.ml ? How about including 
a.mli in a.ml somehow? something along the lines of include in C would 
do it, where including a.h in a.c would make it unnecessary to define 
something in both...

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2004-08-18 22:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-18 22:52 Shaddin Doghmi [this message]
2004-08-18 23:03 ` Kenneth Knowles
2004-08-18 23:44   ` brogoff
2004-08-22 22:19     ` Stefano Zacchiroli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4123DDB3.8010504@mitre.org \
    --to=shaddin@mitre.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).