Copyright | Duncan Coutts 2009 2013 |
---|---|
Maintainer | cabal-devel@haskell.org |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module provides an library interface to the hc-pkg
program.
Currently only GHC and GHCJS have hc-pkg programs.
Synopsis
- data HcPkgInfo = HcPkgInfo {}
- data RegisterOptions = RegisterOptions {}
- defaultRegisterOptions :: RegisterOptions
- init :: HcPkgInfo -> Verbosity -> Bool -> FilePath -> IO ()
- invoke :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDBStack -> [String] -> IO ()
- register :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBStackS from -> InstalledPackageInfo -> RegisterOptions -> IO ()
- unregister :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> IO ()
- recache :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBS from -> IO ()
- expose :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> IO ()
- hide :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> IO ()
- dump :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBX (SymbolicPath from (Dir PkgDB)) -> IO [InstalledPackageInfo]
- describe :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDBStack -> PackageId -> IO [InstalledPackageInfo]
- list :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> IO [PackageId]
- initInvocation :: HcPkgInfo -> Verbosity -> FilePath -> ProgramInvocation
- registerInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBStackS from -> InstalledPackageInfo -> RegisterOptions -> ProgramInvocation
- unregisterInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> ProgramInvocation
- recacheInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBS from -> ProgramInvocation
- exposeInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> ProgramInvocation
- hideInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> ProgramInvocation
- dumpInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBX (SymbolicPath from (Dir PkgDB)) -> ProgramInvocation
- describeInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDBStack -> PackageId -> ProgramInvocation
- listInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> ProgramInvocation
Types
Information about the features and capabilities of an hc-pkg
program.
HcPkgInfo | |
|
data RegisterOptions Source #
Additional variations in the behaviour for register
.
RegisterOptions | |
|
defaultRegisterOptions :: RegisterOptions Source #
Defaults are True
, False
and False
Actions
init :: HcPkgInfo -> Verbosity -> Bool -> FilePath -> IO () Source #
Call hc-pkg
to initialise a package database at the location {path}.
hc-pkg init {path}
invoke :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDBStack -> [String] -> IO () Source #
Run hc-pkg
using a given package DB stack, directly forwarding the
provided command-line arguments to it.
register :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBStackS from -> InstalledPackageInfo -> RegisterOptions -> IO () Source #
Call hc-pkg
to register a package.
hc-pkg register {filename | -} [--user | --global | --package-db]
unregister :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> IO () Source #
Call hc-pkg
to unregister a package
hc-pkg unregister [pkgid] [--user | --global | --package-db]
recache :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBS from -> IO () Source #
Call hc-pkg
to recache the registered packages.
hc-pkg recache [--user | --global | --package-db]
expose :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> IO () Source #
Call hc-pkg
to expose a package.
hc-pkg expose [pkgid] [--user | --global | --package-db]
hide :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> IO () Source #
Call hc-pkg
to hide a package.
hc-pkg hide [pkgid] [--user | --global | --package-db]
dump :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBX (SymbolicPath from (Dir PkgDB)) -> IO [InstalledPackageInfo] Source #
Call hc-pkg
to get all the details of all the packages in the given
package database.
describe :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDBStack -> PackageId -> IO [InstalledPackageInfo] Source #
Call hc-pkg
to retrieve a specific package
hc-pkg describe [pkgid] [--user | --global | --package-db]
list :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> IO [PackageId] Source #
Call hc-pkg
to get the source package Id of all the packages in the
given package database.
This is much less information than with dump
, but also rather quicker.
Note in particular that it does not include the UnitId
, just
the source PackageId
which is not necessarily unique in any package db.
Program invocations
initInvocation :: HcPkgInfo -> Verbosity -> FilePath -> ProgramInvocation Source #
registerInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBStackS from -> InstalledPackageInfo -> RegisterOptions -> ProgramInvocation Source #
unregisterInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> ProgramInvocation Source #
recacheInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBS from -> ProgramInvocation Source #
exposeInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> ProgramInvocation Source #
hideInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> PackageId -> ProgramInvocation Source #
dumpInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir from)) -> PackageDBX (SymbolicPath from (Dir PkgDB)) -> ProgramInvocation Source #
describeInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDBStack -> PackageId -> ProgramInvocation Source #
listInvocation :: HcPkgInfo -> Verbosity -> Maybe (SymbolicPath CWD (Dir Pkg)) -> PackageDB -> ProgramInvocation Source #