X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=docs%2Fusers_guide%2Fpackages.xml;h=0d7a02f25106afb075763d0e36b598f9237f984a;hp=29b4c22444dba3ab7b339490d55e11dac9799af0;hb=432b9c9322181a3644083e3c19b7e240d90659e7;hpb=5263c9ab4408e3b62dbf7505ab40a81946d4e49b
diff --git a/docs/users_guide/packages.xml b/docs/users_guide/packages.xml
index 29b4c22..0d7a02f 100644
--- a/docs/users_guide/packages.xml
+++ b/docs/users_guide/packages.xml
@@ -469,6 +469,13 @@ $ export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf:
options are given, the rightmost one is used as the database to act
upon.
+ Commands that query the package database (list, latest,
+ describe, field) operate on the list of databases specified by
+ the flags , , and
+ . If none of these flags are
+ given, the default is
+ .
+
If the environment variable GHC_PACKAGE_PATH is
set, and its value does not end in a separator (: on
Unix, ; on Windows), then the last database is
@@ -529,6 +536,15 @@ $ export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf:
+ ghc-pkg check
+
+ Check consistency of dependencies in the package
+ database, and report packages that have missing
+ dependencies.
+
+
+
+ ghc-pkg hide PSets the exposed flag for package
@@ -562,6 +578,26 @@ $ export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf:
+ ghc-pkg find-module M []
+
+ This option lists registered packages exposing module
+ M. Examples:
+
+$ ghc-pkg find-module Var
+c:/fptools/validate/ghc/driver/package.conf.inplace:
+ (ghc-6.9.20080428)
+
+$ ghc-pkg find-module Data.Sequence
+c:/fptools/validate/ghc/driver/package.conf.inplace:
+ containers-0.1
+
+ Otherwise, it behaves like ghc-pkg list,
+ including options.
+
+
+
+
+ ghc-pkg latest PPrints the latest available version of package
@@ -577,18 +613,67 @@ $ export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf:
InstalledPackageInfo, the same as the input file
format for ghc-pkg register. See for details.
+
+ If the pattern matches multiple packages, the
+ description for each package is emitted, separated by the
+ string --- on a line by itself.
- ghc-pkg field Pfield
+ ghc-pkg field Pfield[,field]*Show just a single field of the installed package description
- for P.
+ for P. Multiple fields can be selected by separating
+ them with commas
+
+
+ ghc-pkg dump
+
+ Emit the full description of every package, in the
+ form of an InstalledPackageInfo.
+ Multiple package descriptions are separated by the
+ string --- on a line by itself.
+
+ This is almost the same as ghc-pkg describe '*', except that ghc-pkg dump
+ is intended for use by tools that parse the results, so
+ for example where ghc-pkg describe '*'
+ will emit an error if it can't find any packages that
+ match the pattern, ghc-pkg dump will
+ simply emit nothing.
+
+
+
+ Substring matching is supported for M in
+ find-module and for P in
+ list, describe, and
+ field, where a '*' indicates open
+ substring ends (prefix*, *suffix,
+ *infix*). Examples (output omitted):
+
+
+ -- list all regex-related packages
+ ghc-pkg list '*regex*' --ignore-case
+ -- list all string-related packages
+ ghc-pkg list '*string*' --ignore-case
+ -- list OpenGL-related packages
+ ghc-pkg list '*gl*' --ignore-case
+ -- list packages exporting modules in the Data hierarchy
+ ghc-pkg find-module 'Data.*'
+ -- list packages exporting Monad modules
+ ghc-pkg find-module '*Monad*'
+ -- list names and maintainers for all packages
+ ghc-pkg field '*' name,maintainer
+ -- list location of haddock htmls for all packages
+ ghc-pkg field '*' haddock-html
+ -- dump the whole database
+ ghc-pkg describe '*'
+
+
Additionally, the following flags are accepted by
ghc-pkg: