Cabal-1.18.1.3: A framework for packaging Haskell software

Copyright | Duncan Coutts 2009, 2013
Maintainer | cabal-devel@haskell.org
Portability | portable
Safe Haskell | None
Language | Haskell98

Distribution.Simple.Program.HcPkg

Contents

- Program invocations

Description

This module provides an library interface to the `hc-pkg` program. Currently only GHC and LHC have hc-pkg programs.

Synopsis

- init :: Verbosity -> ConfiguredProgram -> FilePath -> IO ()
- invoke :: Verbosity -> ConfiguredProgram -> PackageDBStack -> [String] -> IO ()
- register :: Verbosity -> ConfiguredProgram -> PackageDBStack -> Either FilePath InstalledPackageInfo -> IO ()
- reregister :: Verbosity -> ConfiguredProgram -> PackageDBStack -> Either FilePath InstalledPackageInfo -> IO ()
- unregister :: Verbosity -> ConfiguredProgram -> PackageDB -> PackageId -> IO ()
- expose :: Verbosity -> ConfiguredProgram -> PackageDB -> PackageId -> IO ()
- hide :: Verbosity -> ConfiguredProgram -> PackageDB -> PackageId -> IO ()
- dump :: Verbosity -> ConfiguredProgram -> PackageDB -> IO [InstalledPackageInfo]
- list :: Verbosity -> ConfiguredProgram -> PackageDB -> IO [PackageId]
- initInvocation :: ConfiguredProgram -> Verbosity -> FilePath -> ProgramInvocation
- registerInvocation :: ConfiguredProgram -> Verbosity -> PackageDBStack -> Either FilePath InstalledPackageInfo -> ProgramInvocation
- reregisterInvocation :: ConfiguredProgram -> Verbosity -> PackageDBStack -> Either FilePath InstalledPackageInfo -> ProgramInvocation
- unregisterInvocation :: ConfiguredProgram -> Verbosity -> PackageDB -> PackageId -> ProgramInvocation
- exposeInvocation :: ConfiguredProgram -> Verbosity -> PackageDB -> PackageId -> ProgramInvocation
- hideInvocation :: ConfiguredProgram -> Verbosity -> PackageDB -> PackageId -> ProgramInvocation
- dumpInvocation :: ConfiguredProgram -> Verbosity -> PackageDB -> ProgramInvocation
- listInvocation :: ConfiguredProgram -> Verbosity -> PackageDB -> ProgramInvocation

# Documentation

init :: Verbosity -> ConfiguredProgram -> FilePath -> IO ()

Call `hc-pkg` to initialise a package database at the location {path}.

    hc-pkg init {path}

invoke :: Verbosity -> ConfiguredProgram -> PackageDBStack -> [String] -> IO ()

Run `hc-pkg` using a given package DB stack, directly forwarding the provided command-line arguments to it.

register :: Verbosity -> ConfiguredProgram -> PackageDBStack -> Either FilePath InstalledPackageInfo -> IO ()

Call `hc-pkg` to register a package.

    hc-pkg register {filename | -} [--user | --global | --package-db]

reregister :: Verbosity -> ConfiguredProgram -> PackageDBStack -> Either FilePath InstalledPackageInfo -> IO ()

Call `hc-pkg` to re-register a package.

    hc-pkg register {filename | -} [--user | --global | --package-db]

unregister :: Verbosity -> ConfiguredProgram -> PackageDB -> PackageId -> IO ()

Call `hc-pkg` to unregister a package

    hc-pkg unregister [pkgid] [--user | --global | --package-db]

expose :: Verbosity -> ConfiguredProgram -> PackageDB -> PackageId -> IO ()

Call `hc-pkg` to expose a package.

    hc-pkg expose [pkgid] [--user | --global | --package-db]

hide :: Verbosity -> ConfiguredProgram -> PackageDB -> PackageId -> IO ()

Call `hc-pkg` to expose a package.

    hc-pkg expose [pkgid] [--user | --global | --package-db]

dump :: Verbosity -> ConfiguredProgram -> PackageDB -> IO [InstalledPackageInfo]

Call `hc-pkg` to get all the details of all the packages in the given package database.

list :: Verbosity -> ConfiguredProgram -> PackageDB -> IO [PackageId]

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 `InstalledPackageId`, just the source `PackageId` which is not necessarily unique in any package db.

# Program invocations

initInvocation :: ConfiguredProgram -> Verbosity -> FilePath -> ProgramInvocation

registerInvocation :: ConfiguredProgram -> Verbosity -> PackageDBStack -> Either FilePath InstalledPackageInfo -> ProgramInvocation

reregisterInvocation :: ConfiguredProgram -> Verbosity -> PackageDBStack -> Either FilePath InstalledPackageInfo -> ProgramInvocation

unregisterInvocation :: ConfiguredProgram -> Verbosity -> PackageDB -> PackageId -> ProgramInvocation

exposeInvocation :: ConfiguredProgram -> Verbosity -> PackageDB -> PackageId -> ProgramInvocation

hideInvocation :: ConfiguredProgram -> Verbosity -> PackageDB -> PackageId -> ProgramInvocation

dumpInvocation :: ConfiguredProgram -> Verbosity -> PackageDB -> ProgramInvocation

listInvocation :: ConfiguredProgram -> Verbosity -> PackageDB -> ProgramInvocation