Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000005OCamlOCaml generalpublic1999-12-20 11:102002-11-06 16:33
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000005: packages
DescriptionFull_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

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0003274)
administrator (administrator)
2002-11-06 16:33

option -pack partially answers this need

- Issue History
Date Modified Username Field Change
2005-11-18 10:14 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker