Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Alessandro Baretta <alex@b...>
Subject: Re: [Caml-list] module namespace


Christian Lindig wrote:
> On Wed, Nov 06, 2002 at 06:56:23PM +0200, Yurii A. Rashkovskii wrote:
> 
>>>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?
>>
>>Well, I like and will implement it soon.
> 
> 
> Dynamic linking suggests that you are linking *.cmo files but the
> previous author talked about *.mli files. Anyway, linking binary object
> files and hence libraries is a can of worms: files from different
> compiler versions are incompatible. Any ideas about this?
> 
> -- Christian

This is no big deal really. Compiled modules and compiled 
interfaces are "signed" by the compiler with an MD5 checksum 
and with the compiler's own version number. Here's a brief 
discussion of the topic by Xavier: 
http://caml.inria.fr/archives/200208/msg00004.html.

The runtime system will simply have to throw an exception at 
runtime if it is unable to locate the appropriate module, 
with the correct checksum and version number. Runtime 
exceptions are the price to pay for runtime linking.

Alex

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