Browse thread
[Caml-list] camlimages vs. labltk
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Damien Doligez <Damien.Doligez@i...> |
| Subject: | Re: [Caml-list] naming conflicts (was: camlimages vs. labltk) |
On Tuesday, April 1, 2003, at 09:51 PM, Chris Hecker wrote: > In other words, if I -pack B and A, and B uses a module A, then B's > imports should be resolved to the A that it got packed with. I think we're in violent agreement here. Then my point simply becomes that we need to rename B's imports to get this result. Making this renaming implicit or explicit then becomes a matter of design. > In fact, this might already happen with pack, since you can -pack > modules that refer to other modules, and since they're now in a > super-module, the semantics are that they should still refer to the > submodules at the same scope. So, this should already work with > -pack, no? Yes, but that's because -pack actually performs a link of the packed modules. It renames B's imports by resolving them. > If so, then the cmo/cma partial linking thing is the only thing > wrong with -pack from both a package and namespace manager > perspective. If you want -pack to produce a cma (i.e. a collection of independent modules), then you have to rename A both as an export and as B's import. Actually, that's not quite true. In bytecode, you can link several modules with the same name in a program. If you take care to link them in the right order, you can make sure that other modules' imports are resolved by the right versions. But in native code this trick doesn't work. -- Damien ------------------- 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