From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA21442; Sun, 7 Sep 2003 18:41:37 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA25268 for ; Sun, 7 Sep 2003 18:41:36 +0200 (MET DST) Received: from ux9.sp.cs.cmu.edu (UX9.SP.CS.CMU.EDU [128.2.220.166]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id h87GfZf02894 for ; Sun, 7 Sep 2003 18:41:35 +0200 (MET DST) Received: from 12-203-149-172.client.attbi.com ([12.203.149.172]) by ux9.sp.cs.cmu.edu id aa13316; 7 Sep 2003 12:41 EDT Received: from ecc by stratocaster.home with local (Exim 3.36 #1 (Debian)) id 19w2bJ-00048W-00 for ; Sun, 07 Sep 2003 12:41:21 -0400 Date: Sun, 7 Sep 2003 12:41:21 -0400 To: caml-list@inria.fr Subject: [Caml-list] referencing the signature inferred from a .mli file? Message-ID: <20030907164121.GA15853@ecooper.com> Mail-Followup-To: caml-list@inria.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i From: "Eric C. Cooper" X-Loop: caml-list@inria.fr X-Spam: no; 0.00; inferred:01 mli:01 struct:01 mli:01 textually:01 val:01 200107:01 followup:01 caml:01 inherit:01 sig:01 sig:01 mottl:02 module:03 module:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Suppose I extend an existing module, like the standard List module, with some new functions: list_extensions.ml: module List = struct (* Include standard List module. *) include List (* Add some extensions. *) let private_value = ... let public_value = ... end As far as I can tell, I can't write a list_extensions.mli file without textually including the standard List .mli file, which isn't very good software engineering practice. I would like to write something like module List : sig include_sig List val public_value : ... end where "include_sig M" is equivalent to including the contents of the corresponding .mli file for module M. (Maybe the "inherit" keyword could be re-used for this purpose?) It looks like Markus Mottl made a similar request in http://caml.inria.fr/archives/200107/msg00259.html but I didn't see any followup. -- Eric C. Cooper e c c @ c m u . e d u ------------------- 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