caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Module system and multiple libraries
@ 2005-06-29  4:31 Jonathan Roewen
  2005-06-29  8:23 ` Richard Jones
  2005-06-29  8:42 ` Julien Signoles
  0 siblings, 2 replies; 3+ messages in thread
From: Jonathan Roewen @ 2005-06-29  4:31 UTC (permalink / raw)
  To: caml-list

Hi,

Does OCaml have any support for having modules of the same name in
different libraries? If not, it should be seriously looked at.

I guess something as simple as using the folder name as a base, and
for multiple module names conflicting with the base library,
unprefixed modules would be the standard library.

Just that I want to create modules that will collide with names from
other libraries/standard library, and I don't want to run into more
namespace collision problems. The record scoping rules are painful
enough.

Jonathan


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Module system and multiple libraries
  2005-06-29  4:31 [Caml-list] Module system and multiple libraries Jonathan Roewen
@ 2005-06-29  8:23 ` Richard Jones
  2005-06-29  8:42 ` Julien Signoles
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Jones @ 2005-06-29  8:23 UTC (permalink / raw)
  To: Jonathan Roewen; +Cc: caml-list

On Wed, Jun 29, 2005 at 04:31:22PM +1200, Jonathan Roewen wrote:
> Just that I want to create modules that will collide with names from
> other libraries/standard library, and I don't want to run into more
> namespace collision problems. The record scoping rules are painful
> enough.

Choose a unique prefix and call your modules Prefix_mod1, Prefix_mod2, etc.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Module system and multiple libraries
  2005-06-29  4:31 [Caml-list] Module system and multiple libraries Jonathan Roewen
  2005-06-29  8:23 ` Richard Jones
@ 2005-06-29  8:42 ` Julien Signoles
  1 sibling, 0 replies; 3+ messages in thread
From: Julien Signoles @ 2005-06-29  8:42 UTC (permalink / raw)
  To: Jonathan Roewen; +Cc: caml-list


> Does OCaml have any support for having modules of the same name in
> different libraries?

You can use the -pack option of ocamlc/ocamlopt.

--
Julien Signoles


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-06-29  8:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-29  4:31 [Caml-list] Module system and multiple libraries Jonathan Roewen
2005-06-29  8:23 ` Richard Jones
2005-06-29  8:42 ` Julien Signoles

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).