cabal-helper-1.0.0.0: Give Haskell development tools access to Cabal project environment

Safe HaskellNone
LanguageHaskell2010

CabalHelper.Runtime.Compat

Synopsis

Documentation

data UnitId #

A unit identifier identifies a (possibly instantiated) package/component that can be installed the installed package database. There are several types of components that can be installed:

  • A traditional library with no holes, so that unitIdHash is Nothing. In the absence of Backpack, UnitId is the same as a ComponentId.
  • An indefinite, Backpack library with holes. In this case, unitIdHash is still Nothing, but in the install, there are only interfaces, no compiled objects.
  • An instantiated Backpack library with all the holes filled in. unitIdHash is a Just a hash of the instantiating mapping.

A unit is a component plus the additional information on how the holes are filled in. Thus there is a one to many relationship: for a particular component there are many different ways of filling in the holes, and each different combination is a unit (and has a separate UnitId).

UnitId is distinct from OpenUnitId, in that it is always installed, whereas OpenUnitId are intermediate unit identities that arise during mixin linking, and don't necessarily correspond to any actually installed unit. Since the mapping is not actually recorded in a UnitId, you can't actually substitute over them (but you can substitute over OpenUnitId). See also Distribution.Backpack.FullUnitId for a mechanism for expanding an instantiated UnitId to retrieve its mapping.

Backwards compatibility note: if you need to get the string representation of a UnitId to pass, e.g., as a -package-id flag, use the display function, which will work on all versions of Cabal.

Instances
Eq UnitId 
Instance details

Defined in Distribution.Types.UnitId

Methods

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

(/=) :: UnitId -> UnitId -> Bool #

Data UnitId 
Instance details

Defined in Distribution.Types.UnitId

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnitId -> c UnitId #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnitId #

toConstr :: UnitId -> Constr #

dataTypeOf :: UnitId -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UnitId) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnitId) #

gmapT :: (forall b. Data b => b -> b) -> UnitId -> UnitId #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r #

gmapQ :: (forall d. Data d => d -> u) -> UnitId -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UnitId -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId #

Ord UnitId 
Instance details

Defined in Distribution.Types.UnitId

Read UnitId 
Instance details

Defined in Distribution.Types.UnitId

Show UnitId 
Instance details

Defined in Distribution.Types.UnitId

IsString UnitId

mkUnitId

Since: Cabal-2.0.0.2

Instance details

Defined in Distribution.Types.UnitId

Methods

fromString :: String -> UnitId #

Generic UnitId 
Instance details

Defined in Distribution.Types.UnitId

Associated Types

type Rep UnitId :: Type -> Type #

Methods

from :: UnitId -> Rep UnitId x #

to :: Rep UnitId x -> UnitId #

Text UnitId 
Instance details

Defined in Distribution.Types.UnitId

Methods

disp :: UnitId -> Doc #

parse :: ReadP r UnitId #

Parsec UnitId

The textual format for UnitId coincides with the format GHC accepts for -package-id.

Instance details

Defined in Distribution.Types.UnitId

Methods

parsec :: CabalParsing m => m UnitId #

Pretty UnitId

The textual format for UnitId coincides with the format GHC accepts for -package-id.

Instance details

Defined in Distribution.Types.UnitId

Methods

pretty :: UnitId -> Doc #

NFData UnitId 
Instance details

Defined in Distribution.Types.UnitId

Methods

rnf :: UnitId -> () #

Binary UnitId 
Instance details

Defined in Distribution.Types.UnitId

Methods

put :: UnitId -> Put #

get :: Get UnitId #

putList :: [UnitId] -> Put #

type Rep UnitId 
Instance details

Defined in Distribution.Types.UnitId

type Rep UnitId = D1 (MetaData "UnitId" "Distribution.Types.UnitId" "Cabal-2.4.0.1" True) (C1 (MetaCons "UnitId" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ShortText)))