[project @ 2002-12-18 16:29:25 by simonmar]
authorsimonmar <unknown>
Wed, 18 Dec 2002 16:29:34 +0000 (16:29 +0000)
committersimonmar <unknown>
Wed, 18 Dec 2002 16:29:34 +0000 (16:29 +0000)
commit854ab9a44c4f9a9cb6239bb0af14c150b0e454c6
treeba572fa1774d179672f2dfc2bb0eb2f591a49941
parentf6ba57ea88bdc30e3f19ca1c8ddd3180377ac219
[project @ 2002-12-18 16:29:25 by simonmar]
"Auto" packages.

The big change here is that it is no longer necessary to explicitly
say '-package X' on the command line if X is a package containing
hierarchical Haskell modules.  All packages marked "auto" contribute
to the import path, so their modules are always available.  At link
time, the compiler knows which packages are actually used by the
program, and it links in only those libraries needed.

There's one exception: one-shot linking.  If you link a program using

    ghc -o prog A.o B.o ...

then you need to explicitly add -package flags for each package
required (except base & haskell98) because the compiler has no
information about the package dependencies in this case.

Package configs have a new field: auto, which is either True or False.
Non-auto packages must be mentioned on the command-line as usual.
Non-auto packages are still required for:

  - non-hierarchical libraries (to avoid polluting the module namespace)

  - packages with no Haskell content

  - if you want more than one version of a package, or packages
    providing overlapping functionality where the user must decide
    which one to use.

Doc changes to follow...
12 files changed:
ghc/compiler/compMan/CompManager.lhs
ghc/compiler/ghci/Linker.lhs
ghc/compiler/main/CodeOutput.lhs
ghc/compiler/main/DriverPipeline.hs
ghc/compiler/main/DriverState.hs
ghc/compiler/main/Finder.lhs
ghc/compiler/main/HscMain.lhs
ghc/compiler/main/Main.hs
ghc/compiler/main/Packages.lhs
ghc/compiler/main/ParsePkgConf.y
ghc/utils/ghc-pkg/Package.hs
ghc/utils/ghc-pkg/ParsePkgConfLite.y