[ocaml-platform] Changes to my previous proposal for namespaces

Leo White lpw25 at cam.ac.uk
Tue Mar 19 12:51:17 GMT 2013


> I'm more concerned with the fact that order matters even if there is no conflict, which, again is a departure from
> today's situation.  ocamlfind will need to pass -I flags in the correct order.  

If a package wanted to have a path file "foo.mlpath":

    Foo#Mutex: Core#Mutex

then it would provide a package description for ocamlfind equivalent to
the following (using made up syntax):

    path := ./foo.mlpath
    path-depends := core

this would ensure that its -I flags were correctly ordered.

For people using a single large code base, rather than ocamlfind, then
it would be easier for them to use the file name directly rather than an alias.

> Wouldn't it be better to resolve aliases
> in the same way as references in the source code (i.e. using all the -I flags)?

This might allow loops in aliases. It would also prevent things like:

Foo_Original#* : Foo#*
Foo#Bar : new_foo_bar.cmi

which allows you to substitute a new module in a namespace, while
providing a mechanism (Foo_Original) for accessing the old version.


More information about the Platform mailing list