X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fpackages.xml;h=8d668f9b1fa27275897797bec9365b020080dc98;hb=035890658d56bc5233f73b311a1bd08c41752d33;hp=b37e266d9fe82bfc8e7f76f9ea7ea65d3918e4e4;hpb=83e0b3737f15b976fe54bd75183ec270b08d7e2f;p=ghc-hetmet.git diff --git a/docs/users_guide/packages.xml b/docs/users_guide/packages.xml index b37e266..8d668f9 100644 --- a/docs/users_guide/packages.xml +++ b/docs/users_guide/packages.xml @@ -393,8 +393,9 @@ $ export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf: –all_load on MacOS X) - When building the package as shared object, GHC wraps - out the underlying linker so that the user gets a common + When building the package as shared library, GHC can be used to + perform the link step. This hides some of the details + out the underlying linker and provides a common interface to all shared object variants that are supported by GHC (DLLs, ELF DSOs, and Mac OS dylibs). The shared object must be named in specific way for two reasons: (1) @@ -578,6 +579,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 @@ -593,18 +614,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 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 + + + 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: