Distribution.Package

Cabal-2.0.1.0: A framework for packaging Haskell software

Copyright | Isaac Jones 2003-2004
License | BSD3
Maintainer | cabal-devel@haskell.org
Portability | portable
Safe Haskell | None
Language | Haskell2010

Distribution.Package

Description

Defines a package identifier along with a parser and pretty printer for it. `PackageIdentifier`s consist of a name and an exact version. It also defines a `Dependency` data type. A dependency is a package name and a version range, like `"foo >= 1.2 && < 2"`.

Synopsis

- module Distribution.Types.AbiHash
- module Distribution.Types.ComponentId
- module Distribution.Types.PackageId
- module Distribution.Types.UnitId
- module Distribution.Types.Module
- module Distribution.Types.PackageName
- module Distribution.Types.PkgconfigName
- module Distribution.Types.Dependency
- class Package pkg where
- packageName :: Package pkg => pkg -> PackageName
- packageVersion :: Package pkg => pkg -> Version
- class HasMungedPackageId pkg where
- mungedName' :: HasMungedPackageId pkg => pkg -> MungedPackageName
- mungedVersion' :: HasMungedPackageId munged => munged -> Version
- class Package pkg => HasUnitId pkg where
- installedPackageId :: HasUnitId pkg => pkg -> UnitId
- class HasUnitId pkg => PackageInstalled pkg where

# Documentation

module Distribution.Types.AbiHash

module Distribution.Types.ComponentId

module Distribution.Types.PackageId

module Distribution.Types.UnitId

module Distribution.Types.Module

module Distribution.Types.PackageName

module Distribution.Types.PkgconfigName

module Distribution.Types.Dependency

class Package pkg where Source #

Class of things that have a `PackageIdentifier`

Types in this class are all notions of a package. This allows us to have different types for the different phases that packages go though, from simple name/id, package description, configured or installed packages.

Not all kinds of packages can be uniquely identified by a `PackageIdentifier`. In particular, installed packages cannot, there may be many installed instances of the same source package.

Minimal complete definition

packageId

Methods

packageId :: pkg -> PackageIdentifier Source #

Instances

Package PackageIdentifier # |
Methods packageId :: PackageIdentifier -> PackageIdentifier Source #
Package PackageDescription # |
Methods packageId :: PackageDescription -> PackageIdentifier Source #
Package GenericPackageDescription # |
Methods packageId :: GenericPackageDescription -> PackageIdentifier Source #
Package InstalledPackageInfo # |
Methods packageId :: InstalledPackageInfo -> PackageIdentifier Source #
Package LinkedComponent # |
Methods packageId :: LinkedComponent -> PackageIdentifier Source #
Package (AnnotatedId id) # |
Methods packageId :: AnnotatedId id -> PackageIdentifier Source #

packageName :: Package pkg => pkg -> PackageName Source #

packageVersion :: Package pkg => pkg -> Version Source #

class HasMungedPackageId pkg where Source #

Minimal complete definition

mungedId

Methods

mungedId :: pkg -> MungedPackageId Source #

Instances

HasMungedPackageId MungedPackageId # |
Methods mungedId :: MungedPackageId -> MungedPackageId Source #
HasMungedPackageId InstalledPackageInfo # |
Methods mungedId :: InstalledPackageInfo -> MungedPackageId Source #

mungedName' :: HasMungedPackageId pkg => pkg -> MungedPackageName Source #

mungedVersion' :: HasMungedPackageId munged => munged -> Version Source #

class Package pkg => HasUnitId pkg where Source #

Packages that have an installed unit ID

Minimal complete definition

installedUnitId

Methods

installedUnitId :: pkg -> UnitId Source #

Instances

HasUnitId InstalledPackageInfo # |
Methods installedUnitId :: InstalledPackageInfo -> UnitId Source #

installedPackageId :: HasUnitId pkg => pkg -> UnitId Source #

Deprecated: Use installedUnitId instead

Compatibility wrapper for Cabal pre-1.24.

class HasUnitId pkg => PackageInstalled pkg where Source #

Class of installed packages.

The primary data type which is an instance of this package is `InstalledPackageInfo`, but when we are doing install plans in Cabal install we may have other, installed package-like things which contain more metadata. Installed packages have exact dependencies `installedDepends`.

Minimal complete definition

installedDepends

Methods

installedDepends :: pkg -> [UnitId] Source #

Instances

PackageInstalled InstalledPackageInfo # |
Methods installedDepends :: InstalledPackageInfo -> [UnitId] Source #