[[project @ 2001-08-13 16:32:43 by simonmar] simonmar**20010813163243 Document -package-conf and ghc-pkg --config-file ] { hunk ./ghc/docs/users_guide/packages.sgml 17 - linkend="book-hslibs">), and packages can be added/removed from an - existing GHC installation, using the supplied + linkend="book-hslibs">), and packages can be added to or removed + from an existing GHC installation, using the supplied hunk ./ghc/docs/users_guide/packages.sgml 53 + + Maintaining a local set of packages + + When GHC starts up, it automatically reads the default set + of packages from a configuration file, normally named + package.conf in your GHC installation + directory. + + You can load in additional package configuration files + using the option: + + + + + + + + Read in the package configuration file + file in addition to the system + default file. This allows the user to have a local set of + packages in addition to the system-wide ones. + + + + + To create your own package configuration file, just create + a new file and put the string + [] in it. Packages can be + added to the new configuration file using the + ghc-pkg tool, described in . + + hunk ./ghc/docs/users_guide/packages.sgml 178 - GHC uses a package configuration file, called - packages.conf, which can be found in your GHC - install directory. This file isn't intended to be edited - directly, instead packages can be added or removed using GHC's - package management tool, ghc-pkg. + The ghc-pkg tool allows packages to be + added or removed from a package configuration file. By default, + the system-wide configuration file is used, but alternatively + packages can be added or removed from a user-specified + configuration file using the + option. An empty package configuration file consists of the + string []. + + The ghc-pkg program accepts the + following options: hunk ./ghc/docs/users_guide/packages.sgml 190 + + + + + + + Reads a package specification (see below) on stdin, + and adds it to the database of installed packages. The + package specification must be a package that isn't already + installed. + + + + + + + + + + Use file instead of the + default package configuration file. This, in conjunction + with GHC's option, allows + a user to have a local set of packages in addition to the + system-wide installed set. + + + hunk ./ghc/docs/users_guide/packages.sgml 243 - - - - - - - Reads a package specification (see below) on stdin, - and adds it to the database of installed packages. The - package specification must be a package that isn't already - installed. - - - hunk ./ghc/docs/users_guide/packages.sgml 255 - In both cases, the old package configuration file is saved - in packages.conf.old in your GHC install - directory, so in an emergency you can always copy this file into - package.conf to restore the old - settings. + When modifying the configuration file + file, a copy of the original file is + saved in file.old, + so in an emergency you can always restore the old settings by + copying the old file back again. }