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
[Caml-list] module namespace
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-11-06 (16:27)
From: Alessandro Baretta <alex@b...>
Subject: Re: [Caml-list] module namespace

Yurii A. Rashkovskii wrote:
> Moin Andreas!
> Andreas Rossberg schrieb am Wednesday, den 06. November 2002:
>>Oz uses URIs to identify and locate modules. By default, the system
>>recognizes file:, http: and x-oz: schemes, the latter denoting the
>>standard library. Module management is programmable however, so that it
>>may be extended to handle other schemes/protocols.
> BTW, it's a nice idea. Most probably next release of OCamlNS will
> deprecate my style of namespaces (Org.Ocaml.[...]) and let namespace
> be "proto://..." and I'll develop ocamlnsc and ocamlnsopt that will
> use namespace URLs to get the modules (even via http) and pass them
> to ocamlc|ocamlopt (in way like ocamlfind). I don't know whether this
> feature is demanded by ocaml users community, but for me it looks
> very attractive and probably I'll use it my project. 
> In my thoughts I think that URL should point to a kinda textual
> module description (with dependencies and so on).

I think this is a very cool feature. It has some interesting 
  implications which must be worked out first. Consider the 
case where the user is not connected to the same service 
that provides the package. A portable computer user, for 
example, or simply someone wishing to install from 
disk-based source distribution. There must be an alternative 
way of resolving packages. One solution might be defining a 
CAMLPATH environment variable à la Java CLASSPATH, and 
looking for the modules in 
<camlpath_directory>/<ns_url_path> before actually 
attempting a network connection.

Finally, a really cool, cool, cool feature would be dynamic 
linking of Ocaml modules from their namespace URL, with 
static typechecking at compile time against the 
corresponding .mli files. How do you like this idea, Yurii?


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: