[[project @ 2005-11-04 16:23:20 by simonmar]
simonmar**20051104162320
Document GHC_PACKAGE_PATH, and changes to the ghc-pkg command line interface.
] {
hunk ./ghc/docs/users_guide/packages.xml 58
-
- To see which modules are exposed by a package:
-
+
+ To see which modules are exposed by a package:
+
hunk ./ghc/docs/users_guide/packages.xml 226
- located, and will create it if it doesn't exist (see ).
+ located, and will create it if it doesn't exist (see ).
hunk ./ghc/docs/users_guide/packages.xml 274
+
+
+ The GHC_PACKAGE_PATH environment variable
+ Environment variableGHC_PACKAGE_PATH
+
+ GHC_PACKAGE_PATH
+ The GHC_PACKAGE_PATH environment variable may be
+ set to a :-separated (;-separated
+ on Windows) list of files containing package databases. This list of
+ package databases is used by GHC and ghc-pkg, with earlier databases in
+ the list overriding later ones. This order was chosen to match the
+ behaviour of the PATH environment variable; think of
+ it as a list of package databases that are searched left-to-right for
+ packages.
+
+ If GHC_PACKAGE_PATH ends in a separator, then
+ the default user and system package databases are appended, in that
+ order. e.g. to augment the usual set of packages with a database of
+ your own, you could say (on Unix):
+
+$ export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf:
+ (use ; instead of : on
+ Windows).
+
+ To check whether your GHC_PACKAGE_PATH setting
+ is doing the right thing, ghc-pkg list will list all
+ the databases in use, in the reverse order they are searched.
+
hunk ./ghc/docs/users_guide/packages.xml 391
- Commands which only inspect the database (list,
- describe, field) will take into
- account the user's local package database too, unless the
- --global option is given. This matches the behaviour
- of GHC, which automatically reads the user's local database if it is
- available.
+ To see what package databases are in use, say
+ ghc-pkg list. The stack of databases that
+ ghc-pkg knows about can be modified using the
+ GHC_PACKAGE_PATH environment variable (see , and using
+ --package-conf options on the
+ ghc-pkg command line.
+
+ When asked to modify a database, ghc-pkg modifies
+ the global database by default. Specifying
+ causes it to act on the user database, or
+ can be used to act on another database entirely. When multiple of these
+ options are given, the rightmost one is used as the database to act
+ upon.
hunk ./ghc/docs/users_guide/packages.xml 470
- user's local database (if is given), and
- any further files specified using the option on
- the command line.
+ user's local database, and any further files specified using the
+ option on the command line.
hunk ./ghc/docs/users_guide/packages.xml 523
-
+
hunk ./ghc/docs/users_guide/packages.xml 555
- Operate on the package database in
- file.
-
- When multiple options are given, or
- is used in conjunction with
- or , the last
- one on the command-line is the one that will be modified.
+ Adds file to the stack of package
+ databases. Additionally, file will
+ also be the database modified by a register,
+ unregister, expose or
+ hide command, unless it is overriden by a later
+ , or
+ option.
hunk ./ghc/docs/users_guide/packages.xml 583
-
+
hunk ./ghc/docs/users_guide/packages.xml 597
-
+
hunk ./ghc/docs/users_guide/packages.xml 629
-
+
}