caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Nesting Modules
Date: Wed, 2 Nov 2005 14:34:46 +0100	[thread overview]
Message-ID: <20051102133446.GA452@first.in-berlin.de> (raw)
In-Reply-To: <43679EEF.70102@confluent.org>

On Tue, Nov 01, 2005 at 10:59:27AM -0600, Tom Hawkins wrote:
> Is it possible to nest modules defined in separate files?
> 
> For example, assume I have...
> 
>   top.ml
>   top.mli
>   bottom.ml
>   bottom.mli
> 

Do you look for something like this:

##############################################################
first:~/Programmierung/includes-in-ocaml oliver$ cat top.ml
let a = "Haha, I'm in top!"

module Bottom = struct include Bottom let c = "oiuh" end

first:~/Programmierung/includes-in-ocaml oliver$ cat bottom.ml
let b = "hello, this is the bottom!"
first:~/Programmierung/includes-in-ocaml oliver$ ocamlc -c bottom.ml
first:~/Programmierung/includes-in-ocaml oliver$ ocamlc -c top.ml   
first:~/Programmierung/includes-in-ocaml oliver$ ocamlc -i top.ml
val a : string
module Bottom : sig val b : string val c : string end
first:~/Programmierung/includes-in-ocaml oliver$ 
##############################################################

???

Ciao,
   Oliver


      parent reply	other threads:[~2005-11-02 13:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-01 16:59 Tom Hawkins
2005-11-02  1:39 ` [Caml-list] " Pietro Abate
2005-11-02  6:43   ` Martin Jambon
2005-11-02  1:45 ` Robert Roessler
2005-11-02  2:03 ` Chris King
2005-11-02  8:42   ` Daniel Bünzli
2005-11-02 12:00     ` Tom Hawkins
2005-11-02 12:09       ` Daniel Bünzli
     [not found] ` <Pine.LNX.4.62.0511011028340.4466@ganymede.cs.unm.edu>
2005-11-02  4:47   ` Tom Hawkins
2005-11-02  9:46 ` Richard Jones
2005-11-02  9:57   ` Daniel Bünzli
2005-11-02 10:47     ` Richard Jones
2005-11-02 10:57       ` Daniel Bünzli
2005-11-02 11:27         ` Richard Jones
2005-11-02 11:59   ` Tom Hawkins
2005-11-02 12:33     ` Richard Jones
2005-11-02 13:11     ` Christophe TROESTLER
2005-11-02 14:02       ` Tom Hawkins
2005-11-02 14:36         ` Gerd Stolpmann
2005-11-02 13:34 ` Oliver Bandel [this message]

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=20051102133446.GA452@first.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@yquem.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).