| Copyright | (c) Iñaki García Etxebarria 2016 |
|---|---|
| License | BSD-like |
| Maintainer | cabal-devel@haskell.org |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Distribution.Solver.Types.PkgConfigDb
Description
Read the list of packages available to pkg-config.
Synopsis
- data PkgConfigDb
- readPkgConfigDb :: Verbosity -> ProgramDb -> IO PkgConfigDb
- pkgConfigDbFromList :: [(String, String)] -> PkgConfigDb
- pkgConfigPkgIsPresent :: PkgConfigDb -> PkgconfigName -> PkgconfigVersionRange -> Bool
- pkgConfigDbPkgVersion :: PkgConfigDb -> PkgconfigName -> Maybe (Maybe PkgconfigVersion)
- getPkgConfigDbDirs :: Verbosity -> ProgramDb -> IO [FilePath]
Documentation
data PkgConfigDb #
The list of packages installed in the system visible to
pkg-config. This is an opaque datatype, to be constructed with
readPkgConfigDb and queried with pkgConfigPkgPresent.
Constructors
| PkgConfigDb (Map PkgconfigName (Maybe PkgconfigVersion)) | If an entry is |
| NoPkgConfigDb | For when we could not run pkg-config successfully. |
Instances
readPkgConfigDb :: Verbosity -> ProgramDb -> IO PkgConfigDb #
Query pkg-config for the list of installed packages, together
with their versions. Return a PkgConfigDb encapsulating this
information.
pkgConfigDbFromList :: [(String, String)] -> PkgConfigDb #
Create a PkgConfigDb from a list of (packageName, version) pairs.
pkgConfigPkgIsPresent :: PkgConfigDb -> PkgconfigName -> PkgconfigVersionRange -> Bool #
Check whether a given package range is satisfiable in the given
pkg-config database.
pkgConfigDbPkgVersion :: PkgConfigDb -> PkgconfigName -> Maybe (Maybe PkgconfigVersion) #
Query the version of a package in the pkg-config database.
Nothing indicates the package is not in the database, while
Just Nothing indicates that the package is in the database,
but its version is not known.