X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=docs%2Fusers_guide%2Fpackages.xml;h=8f8f880237ba5070574d66d1d4dcd50dd2647daf;hp=b37e266d9fe82bfc8e7f76f9ea7ea65d3918e4e4;hb=29edb8f84852f3bd5bdb1c859bc469f209262d27;hpb=4e36a8b19e25e69d28c43f8d09d5ecc02329948d diff --git a/docs/users_guide/packages.xml b/docs/users_guide/packages.xml index b37e266..8f8f880 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 P Prints the latest available version of package @@ -597,14 +617,42 @@ $ export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf: - ghc-pkg field P field + ghc-pkg field P field[,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 + + 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: