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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 680C5D45F for ; Wed, 2 Nov 2005 10:27:15 +0100 (CET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jA29RDU3017830 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 2 Nov 2005 10:27:15 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1EXFC9-0007UF-00; Wed, 02 Nov 2005 09:46:13 +0000 Date: Wed, 2 Nov 2005 09:46:13 +0000 To: Tom Hawkins Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Nesting Modules Message-ID: <20051102094613.GA8506@furbychan.cocan.org> 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.3.28i From: Richard Jones X-Miltered: at concorde with ID 43688671.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 nesting:01 compiler:01 mli:01 mli:01 notepad:01 wrote:01 inline:01 modules:01 modules:01 hierarchy:01 hierarchical:02 hierarchical:02 renaming:02 somewhere:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_FAIL autolearn=disabled version=3.0.3 On Tue, Nov 01, 2005 at 10:59:27AM -0600, Tom Hawkins wrote: > Can I instruct the compiler to nest Bottom somewhere in Top, to obtain > clean, hierarchical names (eg: Top.Bottom.some_function)? Of course I > can inline bottom.ml in top.ml, but then the file become rather large. If you want clean, hierarchical names it's much better to use '_' to separate the hierarchies (eg. Top_Bottom). The reason for this is that it allows others to extend your hierarchy by adding other modules (eg. someone else can easily then create Top_MyExtension). This means a bit of file renaming: top.mli top.ml top_Bottom.mli top_Button.ml Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com