| 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.
PackageIdentifiers 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
- packageId :: pkg -> PackageIdentifier
- packageName :: Package pkg => pkg -> PackageName
- packageVersion :: Package pkg => pkg -> Version
- class HasMungedPackageId pkg where
- mungedId :: pkg -> MungedPackageId
- mungedName' :: HasMungedPackageId pkg => pkg -> MungedPackageName
- mungedVersion' :: HasMungedPackageId munged => munged -> Version
- class Package pkg => HasUnitId pkg where
- installedUnitId :: pkg -> UnitId
- installedPackageId :: HasUnitId pkg => pkg -> UnitId
- class HasUnitId pkg => PackageInstalled pkg where
- installedDepends :: pkg -> [UnitId]
Documentation
module Distribution.Types.AbiHash
module Distribution.Types.PackageId
module Distribution.Types.UnitId
module Distribution.Types.Module
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.
Methods
packageId :: pkg -> PackageIdentifier #
Instances
| Package PackageIdentifier # | |
Defined in Distribution.Package Methods | |
| Package PackageDescription # | |
Defined in Distribution.Types.PackageDescription Methods | |
| Package GenericPackageDescription # | |
Defined in Distribution.Types.GenericPackageDescription Methods packageId :: GenericPackageDescription -> PackageIdentifier # | |
| Package InstalledPackageInfo # | |
Defined in Distribution.Types.InstalledPackageInfo Methods | |
| Package LinkedComponent # | |
Defined in Distribution.Backpack.LinkedComponent Methods | |
| Package (AnnotatedId id) # | |
Defined in Distribution.Types.AnnotatedId Methods packageId :: AnnotatedId id -> PackageIdentifier # | |
packageName :: Package pkg => pkg -> PackageName #
packageVersion :: Package pkg => pkg -> Version #
class HasMungedPackageId pkg where #
Methods
mungedId :: pkg -> MungedPackageId #
Instances
| HasMungedPackageId MungedPackageId # | |
Defined in Distribution.Package Methods | |
| HasMungedPackageId InstalledPackageInfo # | |
Defined in Distribution.Types.InstalledPackageInfo Methods | |
mungedName' :: HasMungedPackageId pkg => pkg -> MungedPackageName #
mungedVersion' :: HasMungedPackageId munged => munged -> Version #
class Package pkg => HasUnitId pkg where #
Packages that have an installed unit ID
Methods
installedUnitId :: pkg -> UnitId #
Instances
| HasUnitId InstalledPackageInfo # | |
Defined in Distribution.Types.InstalledPackageInfo Methods | |
installedPackageId :: HasUnitId pkg => pkg -> UnitId #
Deprecated: Use installedUnitId instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018).
Compatibility wrapper for Cabal pre-1.24.
class HasUnitId pkg => PackageInstalled pkg where #
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.
Methods
installedDepends :: pkg -> [UnitId] #
Instances
| PackageInstalled InstalledPackageInfo # | |
Defined in Distribution.Types.InstalledPackageInfo Methods installedDepends :: InstalledPackageInfo -> [UnitId] # | |