Browse thread
[Caml-list] Error during partial linking
[
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: | David Brown <caml-list@d...> |
| Subject: | Re: [Caml-list] Error during partial linking |
On Tue, Oct 22, 2002 at 04:38:48PM -0700, Chris Hecker wrote: > >That is what -pack is for, isn't it ? Has anyone though of a way to actually put submodules in separate files. Ada allows this by placing the modules in separate files (you can still code the submodule (package) in the one file). The GNU Ada compiler uses naming conventions to resolve this. For example: A file std-list.ml would be the module Std.List We have to figure out how this interacts with the std.ml module, but this is the general idea. This is actually the single feature I've wished the ocaml module system had. The Ada approach also allows you to add submodules after the fact. One proposal would be that before compiling std-list.ml, you have to compile std.ml. When std-list.cmo is linked, the new module (List) is added to the std's names. There is a possibility of duplicate names, but camls seems to handle that normally by just replacing the previous definition. Dave Brown ------------------- 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