Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions for the GHC package database.
- findGhcPkgId :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) => EnvOverride -> WhichCompiler -> [Path Abs Dir] -> PackageName -> m (Maybe GhcPkgId)
- findGhcPkgKey :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) => EnvOverride -> WhichCompiler -> [Path Abs Dir] -> PackageName -> m (Maybe Text)
- getGlobalDB :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) => EnvOverride -> WhichCompiler -> m (Path Abs Dir)
- data EnvOverride
- envHelper :: EnvOverride -> Maybe [(String, String)]
- createDatabase :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) => EnvOverride -> WhichCompiler -> Path Abs Dir -> m ()
- unregisterGhcPkgId :: (MonadIO m, MonadLogger m, MonadThrow 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
- findGhcPkgHaddockHtml :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) => EnvOverride -> WhichCompiler -> [Path Abs Dir] -> String -> m (Maybe (PackageIdentifier, Path Abs Dir))
- findGhcPkgDepends :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) => EnvOverride -> WhichCompiler -> [Path Abs Dir] -> String -> m [GhcPkgId]
- findTransitiveGhcPkgDepends :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) => EnvOverride -> WhichCompiler -> [Path Abs Dir] -> PackageIdentifier -> m (Set PackageIdentifier)
- listGhcPkgDbs :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) => EnvOverride -> WhichCompiler -> [Path Abs Dir] -> m [PackageIdentifier]
- ghcPkgExeName :: WhichCompiler -> String
- mkGhcPackagePath :: Bool -> Path Abs Dir -> Path Abs Dir -> Path Abs Dir -> Text
Documentation
:: (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
.
:: (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
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.
:: (MonadIO m, MonadLogger m, MonadThrow 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 Source
Get the version of Cabal from the global package database.
:: (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.
:: (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
:: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) | |
=> EnvOverride | |
-> WhichCompiler | |
-> [Path Abs Dir] | package databases |
-> PackageIdentifier | |
-> m (Set PackageIdentifier) |
Finds dependencies of package, and all their dependencies, etc.
listGhcPkgDbs :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m, MonadThrow m) => EnvOverride -> WhichCompiler -> [Path Abs Dir] -> m [PackageIdentifier] Source
ghcPkgExeName :: WhichCompiler -> String Source
Get the name to use for "ghc-pkg", given the compiler version.