From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id A7EF2D45F for ; Wed, 2 Nov 2005 14:35:27 +0100 (CET) Received: from first.in-berlin.de (e178062122.adsl.alicedsl.de [85.178.62.122]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jA2DZRTZ012452 for ; Wed, 2 Nov 2005 14:35:27 +0100 Received: by first.in-berlin.de (Postfix, from userid 501) id EE52418306F; Wed, 2 Nov 2005 14:34:46 +0100 (CET) Date: Wed, 2 Nov 2005 14:34:46 +0100 From: Oliver Bandel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Nesting Modules Message-ID: <20051102133446.GA452@first.in-berlin.de> References: <43679EEF.70102@confluent.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43679EEF.70102@confluent.org> User-Agent: Mutt/1.5.6i X-Miltered: at nez-perce with ID 4368C09F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; oliver:01 bandel:01 oliver:01 in-berlin:01 caml-list:01 nesting:01 mli:01 mli:01 struct:01 ocamlc:01 ocamlc:01 val:01 sig:01 val:01 ...:98 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 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