X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fpackages.xml;h=0d7a02f25106afb075763d0e36b598f9237f984a;hb=cc8e41a3c5e05a1076254ab39a56074e70f9e863;hp=b37e266d9fe82bfc8e7f76f9ea7ea65d3918e4e4;hpb=83e0b3737f15b976fe54bd75183ec270b08d7e2f;p=ghc-hetmet.git
diff --git a/docs/users_guide/packages.xml b/docs/users_guide/packages.xml
index b37e266..0d7a02f 100644
--- a/docs/users_guide/packages.xml
+++ b/docs/users_guide/packages.xml
@@ -578,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
@@ -593,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: