cabal-install-3.10.2.1: The command-line interface for Cabal and Hackage.

Safe Haskell | None
Language | Haskell2010

Distribution.Client.Types.ConfiguredId

Synopsis

- type InstalledPackageId = ComponentId
- data ConfiguredId = ConfiguredId {
  - confSrcId :: PackageId
  - confCompName :: Maybe ComponentName
  - confInstId :: ComponentId
  }
- annotatedIdToConfiguredId :: AnnotatedId ComponentId -> ConfiguredId
- class HasConfiguredId a where
  - configuredId :: a -> ConfiguredId

# Documentation

type InstalledPackageId = ComponentId #

Within Cabal the library we no longer have a `InstalledPackageId` type. That's because it deals with the compilers' notion of a registered library, and those really are libraries not packages. Those are now named units.

The package management layer does however deal with installed packages, as whole packages not just as libraries. So we do still need a type for installed package ids. At the moment however we track installed packages via their primary library, which is a unit id. In future this may change slightly and we may distinguish these two types and have an explicit conversion when we register units with the compiler.

data ConfiguredId #

A ConfiguredId is a package ID for a configured package.

Once we configure a source package we know its UnitId. It is still however useful in lots of places to also know the source ID for the package. We therefore bundle the two.

An already installed package of course is also "configured" (all its configuration parameters and dependencies have been specified).

Constructors

ConfiguredId |

Fields

- confSrcId :: PackageId
- confCompName :: Maybe ComponentName
- confInstId :: ComponentId

#### Instances

Instances details

Package ConfiguredId # |
Instance details Defined in Distribution.Client.Types.ConfiguredId Methods packageId :: ConfiguredId -> PackageIdentifier #
Structured ConfiguredId # |
Instance details Defined in Distribution.Client.Types.ConfiguredId Methods structure :: Proxy ConfiguredId -> Structure # structureHash' :: Tagged ConfiguredId MD5
Generic ConfiguredId # |

Instance details

Defined in Distribution.Client.Types.ConfiguredId

Associated Types

type Rep ConfiguredId |

Instance details

Defined in Distribution.Client.Types.ConfiguredId

type Rep ConfiguredId = D1 ('MetaData "ConfiguredId" "Distribution.Client.Types.ConfiguredId" "cabal-install-3.10.2.1-EH6AEtqwlbKE3rh89dIk81" 'False) (C1 ('MetaCons "ConfiguredId" 'PrefixI 'True) (S1 ('MetaSel ('Just "confSrcId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageId) :*: (S1 ('MetaSel ('Just "confCompName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ComponentName)) :*: S1 ('MetaSel ('Just "confInstId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ComponentId))))

Methods

from :: ConfiguredId -> Rep ConfiguredId x #

to :: Rep ConfiguredId x -> ConfiguredId #

Show ConfiguredId # |
Instance details Defined in Distribution.Client.Types.ConfiguredId Methods showsPrec :: Int -> ConfiguredId -> ShowS # show :: ConfiguredId -> String # showList :: [ConfiguredId] -> ShowS #
Binary ConfiguredId # |
Instance details Defined in Distribution.Client.Types.ConfiguredId Methods put :: ConfiguredId -> Put # get :: Get ConfiguredId # putList :: [ConfiguredId] -> Put #
Eq ConfiguredId # |
Instance details Defined in Distribution.Client.Types.ConfiguredId Methods (==) :: ConfiguredId -> ConfiguredId -> Bool # (/=) :: ConfiguredId -> ConfiguredId -> Bool #
Ord ConfiguredId # |

Instance details

Defined in Distribution.Client.Types.ConfiguredId

Methods

compare :: ConfiguredId -> ConfiguredId -> Ordering #

(<) :: ConfiguredId -> ConfiguredId -> Bool #

(<=) :: ConfiguredId -> ConfiguredId -> Bool #

(>) :: ConfiguredId -> ConfiguredId -> Bool #

(>=) :: ConfiguredId -> ConfiguredId -> Bool #

max :: ConfiguredId -> ConfiguredId -> ConfiguredId #

min :: ConfiguredId -> ConfiguredId -> ConfiguredId #

type Rep ConfiguredId # |

Instance details

Defined in Distribution.Client.Types.ConfiguredId

type Rep ConfiguredId = D1 ('MetaData "ConfiguredId" "Distribution.Client.Types.ConfiguredId" "cabal-install-3.10.2.1-EH6AEtqwlbKE3rh89dIk81" 'False) (C1 ('MetaCons "ConfiguredId" 'PrefixI 'True) (S1 ('MetaSel ('Just "confSrcId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageId) :*: (S1 ('MetaSel ('Just "confCompName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ComponentName)) :*: S1 ('MetaSel ('Just "confInstId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ComponentId))))

annotatedIdToConfiguredId :: AnnotatedId ComponentId -> ConfiguredId #

class HasConfiguredId a where #

Methods

configuredId :: a -> ConfiguredId #

#### Instances

Instances details

HasConfiguredId InstalledPackageInfo # |
Instance details Defined in Distribution.Client.Types.ConfiguredId Methods configuredId :: InstalledPackageInfo -> ConfiguredId #
HasConfiguredId ElaboratedConfiguredPackage # |
Instance details Defined in Distribution.Client.ProjectPlanning.Types Methods configuredId :: ElaboratedConfiguredPackage -> ConfiguredId #
HasConfiguredId (ConfiguredPackage loc) # | `HasConfiguredId` indicates data types which have a `ConfiguredId`. This type class is mostly used to conveniently finesse between `ElaboratedPackage` and `ElaboratedComponent`.
Instance details Defined in Distribution.Client.Types.ConfiguredPackage Methods configuredId :: ConfiguredPackage loc -> ConfiguredId #
(HasConfiguredId ipkg, HasConfiguredId srcpkg) => HasConfiguredId (GenericPlanPackage ipkg srcpkg) # |
Instance details Defined in Distribution.Client.InstallPlan Methods configuredId :: GenericPlanPackage ipkg srcpkg -> ConfiguredId #