Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packages #2329

Closed
vicuna opened this Issue Dec 20, 1999 · 1 comment

Comments

Projects
None yet
1 participant
@vicuna
Copy link
Collaborator

vicuna commented Dec 20, 1999

Original bug ID: 5
Reporter: administrator
Status: closed
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: John Skaller
Version:
OS:
Submission from: estephe.inria.fr (128.93.11.95)
Submitted by: xleroy

Please correct me if I'm wrong, but my understanding is that
ocaml only searches for modules referenced like:

    open X
    ..
    Y.x

in the path given to the compiler. A recent addition to Python
has helped reduce module clutter; a related idea for ocaml is
as follows: given a module name:

    X.Y.Z

X must be on the path, as before, however, if it is a directory,
it is taken to be a module containing all modules contained
in the directory: say the files are Y.cmx, Y2.cmx, then it is
as if Y and Y2 were nested in X like

    (* X.ml *) 
    module Y = ..
    module Y2 = .. 

Given this construction, multimodule packages can be distributed
so they unpack into a single directory, reducing name clashes,
making upgrading and removal easier, and without needing
to continually fiddle with the search path. This feature works
well in Python. It requires no changes to the language (only
some changes to the compilation model).

By default, contributed packages with install options tend to
install themselves in the same place as the standard library.
This is unfortunate, because it is useful to totally wipe out
the whole ocaml distribution and rebuild it, which clobbers
any such contributed modules.

With the package system, a symbolic link could be used to
what Python calls 'site-packages', which is where contributed
modules are installed by default. In this case, the nice feature
is that a fresh ocaml would not contain contributed packages,
but they can be reinstated by reinstalling the old symbolic link.

--
John Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia
homepage: http://www.maxtal.com.au/~skaller
voice: 61-2-9660-0850

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Nov 6, 2002

Comment author: administrator

option -pack partially answers this need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.