stack-0.1.6.0: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.GhcPkg

Description

Functions for the GHC package database.

Synopsis

Documentation

findGhcPkgId Source

Arguments

:: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) 
=> EnvOverride 
-> WhichCompiler 
-> [Path Abs Dir]

package databases

-> PackageName 
-> m (Maybe GhcPkgId) 

Get the id of the package e.g. foo-0.0.0-9c293923c0685761dcff6f8c3ad8f8ec.

findGhcPkgKey Source

Arguments

:: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) 
=> EnvOverride 
-> WhichCompiler 
-> [Path Abs Dir]

package databases

-> PackageName 
-> m (Maybe Text) 

Get the package key e.g. foo_9bTCpMF7G4UFWJJvtDrIdB.

NOTE: GHC > 7.10 only! Will always yield Nothing otherwise.

getGlobalDB :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) => EnvOverride -> WhichCompiler -> m (Path Abs Dir) Source

Get the global package database

data EnvOverride Source

Override the environment received by a child process

envHelper :: EnvOverride -> Maybe [(String, String)] Source

Helper conversion function

createDatabase :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) => EnvOverride -> WhichCompiler -> Path Abs Dir -> m () Source

Create a package database in the given directory, if it doesn't exist.

getCabalPkgVer :: (MonadThrow m, MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> WhichCompiler -> m Version Source

Get the version of Cabal from the global package database.

findGhcPkgHaddockHtml Source

Arguments

:: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) 
=> EnvOverride 
-> WhichCompiler 
-> [Path Abs Dir]

package databases

-> String

PackageIdentifier or GhcPkgId

-> m (Maybe (PackageIdentifier, Path Abs Dir)) 

Get the Haddock HTML documentation path of the package.

findGhcPkgDepends Source

Arguments

:: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) 
=> EnvOverride 
-> WhichCompiler 
-> [Path Abs Dir]

package databases

-> String

package identifier or GhcPkgId

-> m [GhcPkgId] 

Get the dependencies of the package.

findTransitiveGhcPkgDepends Source

Finds dependencies of package, and all their dependencies, etc.

ghcPkgExeName :: WhichCompiler -> String Source

Get the name to use for "ghc-pkg", given the compiler version.

mkGhcPackagePath :: Bool -> Path Abs Dir -> Path Abs Dir -> Path Abs Dir -> Text Source

Get the value for GHC_PACKAGE_PATH