Cabal-1.22.5.0: A framework for packaging Haskell software

Copyright | (c) The University of Glasgow 2004
Maintainer | libraries@haskell.org
Portability | portable
Safe Haskell | None
Language | Haskell98

Distribution.InstalledPackageInfo

Description

This is the information about an installed package that is communicated to the `ghc-pkg` program in order to register a package. `ghc-pkg` now consumes this package format (as of version 6.4). This is specific to GHC at the moment.

The `.cabal` file format is for describing a package that is not yet installed. It has a lot of flexibility, like conditionals and dependency ranges. As such, that format is not at all suitable for describing a package that has already been built and installed. By the time we get to that stage, we have resolved all conditionals and resolved dependency version constraints to exact versions of dependent packages. So, this module defines the `InstalledPackageInfo` data structure that contains all the info we keep about an installed package. There is a parser and pretty printer. The textual format is rather simpler than the `.cabal` format: there are no sections, for example.

# Documentation

data InstalledPackageInfo_ m Source

Constructors

InstalledPackageInfo |

Fields

installedPackageId :: InstalledPackageId
sourcePackageId :: PackageId
packageKey :: PackageKey
license :: License
copyright :: String
maintainer :: String
author :: String
stability :: String
homepage :: String
pkgUrl :: String
synopsis :: String
description :: String
category :: String
exposed :: Bool
exposedModules :: [ExposedModule]
instantiatedWith :: [(m, OriginalModule)]
hiddenModules :: [m]
trusted :: Bool
importDirs :: [FilePath]
libraryDirs :: [FilePath]
dataDir :: FilePath
hsLibraries :: [String]
extraLibraries :: [String]
extraGHCiLibraries :: [String]
includeDirs :: [FilePath]
includes :: [String]
depends :: [InstalledPackageId]
ccOptions :: [String]
ldOptions :: [String]
frameworkDirs :: [FilePath]
frameworks :: [String]
haddockInterfaces :: [FilePath]
haddockHTMLs :: [FilePath]
pkgRoot :: Maybe FilePath

Instances

Read m => Read (InstalledPackageInfo_ m) Source |
Show m => Show (InstalledPackageInfo_ m) Source |
Generic (InstalledPackageInfo_ m) Source |
Binary m => Binary (InstalledPackageInfo_ m) Source |
PackageInstalled (InstalledPackageInfo_ str) Source |
Package (InstalledPackageInfo_ str) Source |
type Rep (InstalledPackageInfo_ m) Source |

type InstalledPackageInfo = InstalledPackageInfo_ ModuleName Source

data OriginalModule Source

Constructors

OriginalModule |

Fields

originalPackageId :: InstalledPackageId
originalModuleName :: ModuleName

Instances

Eq OriginalModule Source |
Read OriginalModule Source |
Show OriginalModule Source |
Generic OriginalModule Source |
Binary OriginalModule Source |
Text OriginalModule Source |
type Rep OriginalModule Source |

data ExposedModule Source

Constructors

ExposedModule |

Fields

exposedName :: ModuleName
exposedReexport :: Maybe OriginalModule
exposedSignature :: Maybe OriginalModule

Instances

Read ExposedModule Source |
Show ExposedModule Source |
Generic ExposedModule Source |
Binary ExposedModule Source |
Text ExposedModule Source |
type Rep ExposedModule Source |

data ParseResult a Source

Constructors

ParseFailed PError |
ParseOk [PWarning] a |

Instances

Monad ParseResult Source |
Functor ParseResult Source |
Applicative ParseResult Source |
Show a => Show (ParseResult a) Source |

data PError Source

Constructors

AmbiguousParse String LineNo |
NoParse String LineNo |
TabsError LineNo |
FromString String (Maybe LineNo) |

Instances

Eq PError Source |
Show PError Source |

data PWarning Source

Instances

Eq PWarning Source |
Show PWarning Source |

emptyInstalledPackageInfo :: InstalledPackageInfo_ m Source

parseInstalledPackageInfo :: String -> ParseResult InstalledPackageInfo Source

showInstalledPackageInfo :: InstalledPackageInfo -> String Source

showInstalledPackageInfoField :: String -> Maybe (InstalledPackageInfo -> String) Source

showSimpleInstalledPackageInfoField :: String -> Maybe (InstalledPackageInfo -> String) Source

fieldsInstalledPackageInfo :: [FieldDescr InstalledPackageInfo] Source