stack-1.3.2: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.GhcPkg

Description

Functions for the GHC package database.

Synopsis

- getGlobalDB :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> WhichCompiler -> m (Path Abs Dir)
- data EnvOverride
- envHelper :: EnvOverride -> Maybe [(String, String)]
- findGhcPkgField :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> WhichCompiler -> [Path Abs Dir] -> String -> Text -> m (Maybe Text)
- createDatabase :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> WhichCompiler -> Path Abs Dir -> m ()
- unregisterGhcPkgId :: (MonadIO m, MonadLogger m, MonadCatch m, MonadBaseControl IO m) => EnvOverride -> WhichCompiler -> CompilerVersion -> Path Abs Dir -> GhcPkgId -> PackageIdentifier -> m ()
- getCabalPkgVer :: (MonadThrow m, MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> WhichCompiler -> m Version
- ghcPkgExeName :: WhichCompiler -> String
- mkGhcPackagePath :: Bool -> Path Abs Dir -> Path Abs Dir -> [Path Abs Dir] -> Path Abs Dir -> Text

# Documentation

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

Get the global package database

data EnvOverride #

Override the environment received by a child process.

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

Helper conversion function.

findGhcPkgField #

Arguments

:: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m) |
=> EnvOverride |
-> WhichCompiler |
-> [Path Abs Dir] | package databases
-> String | package identifier, or GhcPkgId
-> Text |
-> m (Maybe Text) |

Get the value of a field of the package.

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

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

unregisterGhcPkgId #

Arguments

:: (MonadIO m, MonadLogger m, MonadCatch m, MonadBaseControl IO m) |
=> EnvOverride |
-> WhichCompiler |
-> CompilerVersion |
-> Path Abs Dir | package database
-> GhcPkgId |
-> PackageIdentifier |
-> m () |

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

Get the version of Cabal from the global package database.

ghcPkgExeName :: WhichCompiler -> String #

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

mkGhcPackagePath :: Bool -> Path Abs Dir -> Path Abs Dir -> [Path Abs Dir] -> Path Abs Dir -> Text #

Get the value for GHC_PACKAGE_PATH