Cabal-1.24.1.0: A framework for packaging Haskell software

CopyrightDuncan Coutts 2009, 2013
Maintainercabal-devel@haskell.org
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Distribution.Simple.Program.HcPkg

Contents

Description

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

Synopsis

Documentation

data HcPkgInfo Source #

Information about the features and capabilities of an hc-pkg program.

Constructors

HcPkgInfo 

Fields

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 -> 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 -> PackageDBStack -> Either FilePath InstalledPackageInfo -> IO () Source #

Call hc-pkg to register a package.

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

reregister :: HcPkgInfo -> Verbosity -> PackageDBStack -> Either FilePath InstalledPackageInfo -> IO () Source #

Call hc-pkg to re-register a package.

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

unregister :: HcPkgInfo -> Verbosity -> PackageDB -> PackageId -> IO () Source #

Call hc-pkg to unregister a package

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

recache :: HcPkgInfo -> Verbosity -> PackageDB -> IO () Source #

Call hc-pkg to recache the registered packages.

hc-pkg recache [--user | --global | --package-db]

expose :: HcPkgInfo -> Verbosity -> PackageDB -> PackageId -> IO () Source #

Call hc-pkg to expose a package.

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

hide :: HcPkgInfo -> Verbosity -> PackageDB -> PackageId -> IO () Source #

Call hc-pkg to hide a package.

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

dump :: HcPkgInfo -> Verbosity -> PackageDB -> IO [InstalledPackageInfo] Source #

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

describe :: HcPkgInfo -> Verbosity -> PackageDBStack -> PackageId -> IO [InstalledPackageInfo] Source #

Call hc-pkg to retrieve a specific package

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

list :: HcPkgInfo -> Verbosity -> 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