* Re: Managing module names
@ 1997-07-24 5:21 Frank Christoph
1997-07-25 13:56 ` Fabrice Le Fessant
0 siblings, 1 reply; 3+ messages in thread
From: Frank Christoph @ 1997-07-24 5:21 UTC (permalink / raw)
To: caml-list
> >>>>> "monniaux" == David Monniaux <monniaux@csl.sri.com> writes:
> monniaux> Would it be possible to make up some scheme that would to
> monniaux> things like: /graphics/blackwhite/main ->
> monniaux> Graphics.Blackwhite.Main ?
>
> monniaux> Or, better: would it be interesting according to other users?
>
> Absolutely! I think that such an arrangement would be even more useful
> than what exists presently.
In my experience, nested modules are not very useful in (O)CAML because you
cannot have a recursive definition cross a module boundary, and I find that
I quite often have mutual dependencies between sets of definitions whose
namespaces I would nevertheless like to separate.
I suspect that the reason package nesting in Java works so well is partly
due to the fact that recursion, etc. is hardly ever used.
On the other hand, SML seems to use module nesting quite freely, though,
and as far as I know it has the same restrictions on module dependencies...
-- FC
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Managing module names
1997-07-24 5:21 Managing module names Frank Christoph
@ 1997-07-25 13:56 ` Fabrice Le Fessant
1997-07-25 16:39 ` ocamlc compiled in native code Fabrice Le Fessant
0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Le Fessant @ 1997-07-25 13:56 UTC (permalink / raw)
To: caml-list
Bonjour,
Pour ceux qui veulent utiliser un systeme de packages avec Ocaml
1.05, j'ai un patch du compilateur permettant de placer les modules
dans des packages. Cela evite les collisions de noms de modules
identiques lors du link.
Les noms des modules peuvent aussi etre allonges pour specifier le
package auquel ils appartiennent (toujours pour eviter une collision),
par la syntaxe <package>/module (par exemple, List devient
Stdlib/list).
Les packages ne correspondent pas a l'emplacement des fichiers, mais
a la facon dont les modules ont ete compiles:
ocamlc -c list.ml ---> module List
ocamlc -c stdlib/list.ml ---> module Stdlib/list
ocamlc -package stdlib -c list.ml ---> module Stdlib/list
Cependant, le compilateur s'aide quand-meme des noms des packages
pour trouver les modules: Il cherchera d'abord un fichier
stdlib/list.cmi, puis un fichier list.cmi pour matcher le module
Stdlib/list.
Quand on ne specifie pas le nom du package d'un module, et que le
module trouve appartient a un package, le compilateur emet un Warning.
Le patch avec plus de renseignements se trouve sur :
http://www-sor.inria.fr/~lefessan/src/
^ permalink raw reply [flat|nested] 3+ messages in thread
* ocamlc compiled in native code
1997-07-25 13:56 ` Fabrice Le Fessant
@ 1997-07-25 16:39 ` Fabrice Le Fessant
0 siblings, 0 replies; 3+ messages in thread
From: Fabrice Le Fessant @ 1997-07-25 16:39 UTC (permalink / raw)
To: caml-list
I have just make a new little patch to ocaml-1.05 to compile ocamlc in
native code (ocamlopt could already be compiled to native code by
«make ocamlopt.opt» in the standard distribution).
The patch is located in http://www-sor.inria.fr/~lefessan/src/
(http://www-sor.inria.fr/~lefessan/src/patch.ocamlc.opt.gz)
Just apply the patch to the ocaml-1.05 distribution.
Then configure it, «make world», «make opt», «make ocamlopt.opt» and
«make ocamlc.opt».
The new ocamlc compiler in native code is called «ocamlc.opt». You can
rename it to «ocamlc» if you want. Don't forget to copy «ocamlc.opt»
and «ocamlopt.opt» with other binaries as «make install» will not do
it.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1997-07-25 17:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-24 5:21 Managing module names Frank Christoph
1997-07-25 13:56 ` Fabrice Le Fessant
1997-07-25 16:39 ` ocamlc compiled in native code Fabrice Le Fessant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox