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
- data AbiHash
- unAbiHash :: AbiHash -> String
- mkAbiHash :: String -> AbiHash
- module Distribution.Types.ComponentId
- module Distribution.Types.PackageId
- module Distribution.Types.UnitId
- data Module = Module DefUnitId ModuleName
- module Distribution.Types.PackageName
- data PkgconfigName
- unPkgconfigName :: PkgconfigName -> String
- mkPkgconfigName :: String -> 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
- class HasUnitId pkg => PackageInstalled pkg where
- installedDepends :: pkg -> [UnitId]
Documentation
ABI Hashes
Use mkAbiHash
and unAbiHash
to convert from/to a
String
.
This type is opaque since Cabal-2.0
Since: 2.0.0.2
Instances
Eq AbiHash Source # | |
Read AbiHash Source # | |
Show AbiHash Source # | |
IsString AbiHash Source # | Since: 2.0.0.2 |
Defined in Distribution.Types.AbiHash Methods fromString :: String -> AbiHash # | |
Generic AbiHash Source # | |
Binary AbiHash Source # | |
NFData AbiHash Source # | |
Defined in Distribution.Types.AbiHash | |
Structured AbiHash Source # | |
Defined in Distribution.Types.AbiHash | |
Pretty AbiHash Source # | |
Defined in Distribution.Types.AbiHash | |
Parsec AbiHash Source # | |
Defined in Distribution.Types.AbiHash Methods parsec :: CabalParsing m => m AbiHash Source # | |
type Rep AbiHash Source # | |
Defined in Distribution.Types.AbiHash type Rep AbiHash = D1 ('MetaData "AbiHash" "Distribution.Types.AbiHash" "hackport-0.7.2.2-Jf8zaDrP5aANzq8F6jTnI-hackport-external-libs-Cabal" 'True) (C1 ('MetaCons "AbiHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText))) |
module Distribution.Types.PackageId
module Distribution.Types.UnitId
A module identity uniquely identifies a Haskell module by
qualifying a ModuleName
with the UnitId
which defined
it. This type distinguishes between two packages
which provide a module with the same name, or a module
from the same package compiled with different dependencies.
There are a few cases where Cabal needs to know about
module identities, e.g., when writing out reexported modules in
the InstalledPackageInfo
.
Constructors
Module DefUnitId ModuleName |
Instances
Eq Module Source # | |
Data Module Source # | |
Defined in Distribution.Types.Module Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Module -> c Module # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Module # toConstr :: Module -> Constr # dataTypeOf :: Module -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Module) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Module) # gmapT :: (forall b. Data b => b -> b) -> Module -> Module # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r # gmapQ :: (forall d. Data d => d -> u) -> Module -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Module -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Module -> m Module # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Module -> m Module # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Module -> m Module # | |
Ord Module Source # | |
Read Module Source # | |
Show Module Source # | |
Generic Module Source # | |
Binary Module Source # | |
NFData Module Source # | |
Defined in Distribution.Types.Module | |
Structured Module Source # | |
Defined in Distribution.Types.Module | |
Pretty Module Source # | |
Defined in Distribution.Types.Module | |
Parsec Module Source # | |
Defined in Distribution.Types.Module Methods parsec :: CabalParsing m => m Module Source # | |
type Rep Module Source # | |
Defined in Distribution.Types.Module type Rep Module = D1 ('MetaData "Module" "Distribution.Types.Module" "hackport-0.7.2.2-Jf8zaDrP5aANzq8F6jTnI-hackport-external-libs-Cabal" 'False) (C1 ('MetaCons "Module" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DefUnitId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName))) |
data PkgconfigName Source #
A pkg-config library name
This is parsed as any valid argument to the pkg-config utility.
Since: 2.0.0.2
Instances
unPkgconfigName :: PkgconfigName -> String Source #
Convert PkgconfigName
to String
Since: 2.0.0.2
mkPkgconfigName :: String -> PkgconfigName Source #
Construct a PkgconfigName
from a String
mkPkgconfigName
is the inverse to unPkgconfigName
Note: No validations are performed to ensure that the resulting
PkgconfigName
is valid
Since: 2.0.0.2
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.
Methods
packageId :: pkg -> PackageIdentifier Source #
Instances
Package PackageIdentifier Source # | |
Defined in Distribution.Package Methods packageId :: PackageIdentifier -> PackageIdentifier Source # | |
Package InstalledPackageInfo Source # | |
Defined in Distribution.Types.InstalledPackageInfo Methods packageId :: InstalledPackageInfo -> PackageIdentifier Source # | |
Package PackageDescription Source # | |
Defined in Distribution.Types.PackageDescription Methods packageId :: PackageDescription -> PackageIdentifier Source # | |
Package GenericPackageDescription Source # | |
Defined in Distribution.Types.GenericPackageDescription Methods packageId :: GenericPackageDescription -> PackageIdentifier Source # | |
Package (AnnotatedId id) Source # | |
Defined in Distribution.Types.AnnotatedId Methods packageId :: AnnotatedId id -> PackageIdentifier Source # |
packageName :: Package pkg => pkg -> PackageName Source #
packageVersion :: Package pkg => pkg -> Version Source #
class HasMungedPackageId pkg where Source #
Methods
mungedId :: pkg -> MungedPackageId Source #
Instances
HasMungedPackageId MungedPackageId Source # | |
Defined in Distribution.Package Methods | |
HasMungedPackageId InstalledPackageInfo Source # | |
Defined in Distribution.Types.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
Methods
installedUnitId :: pkg -> UnitId Source #
Instances
HasUnitId InstalledPackageInfo Source # | |
Defined in Distribution.Types.InstalledPackageInfo Methods |
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
.
Methods
installedDepends :: pkg -> [UnitId] Source #
Instances
PackageInstalled InstalledPackageInfo Source # | |
Defined in Distribution.Types.InstalledPackageInfo Methods installedDepends :: InstalledPackageInfo -> [UnitId] Source # |