Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Nesting Modules
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Nesting Modules
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 in, 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:



Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology -
Team Notepad - intranets and extranets for business -