Cabal-syntax-3.12.1.0: A library for working with .cabal files

Safe Haskell | None
Language | Haskell2010

Distribution.Types.ComponentId

Synopsis

- data ComponentId
- unComponentId :: ComponentId -> String
- mkComponentId :: String -> ComponentId

# Documentation

data ComponentId Source #

A `ComponentId` uniquely identifies the transitive source code closure of a component (i.e. libraries, executables).

For non-Backpack components, this corresponds one to one with the `UnitId`, which serves as the basis for install paths, linker symbols, etc.

Use `mkComponentId` and `unComponentId` to convert from/to a `String`.

This type is opaque since `Cabal-2.0`

Since: Cabal-syntax-2.0.0.2

#### Instances

Instances details

Parsec ComponentId Source # |
Instance details Defined in Distribution.Types.ComponentId Methods parsec :: CabalParsing m => m ComponentId Source #
Pretty ComponentId Source # |
Instance details Defined in Distribution.Types.ComponentId Methods pretty :: ComponentId -> Doc Source # prettyVersioned :: CabalSpecVersion -> ComponentId -> Doc Source #
Structured ComponentId Source # |
Instance details Defined in Distribution.Types.ComponentId Methods structure :: Proxy ComponentId -> Structure Source # structureHash' :: Tagged ComponentId MD5
Binary ComponentId Source # |
Instance details Defined in Distribution.Types.ComponentId Methods put :: ComponentId -> Put Source # get :: Get ComponentId Source # putList :: [ComponentId] -> Put Source #
NFData ComponentId Source # |
Instance details Defined in Distribution.Types.ComponentId Methods rnf :: ComponentId -> () Source #
Data ComponentId Source # |

Instance details

Defined in Distribution.Types.ComponentId

Methods

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

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

toConstr :: ComponentId -> Constr #

dataTypeOf :: ComponentId -> DataType #

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

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

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

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

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

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

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

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

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

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

IsString ComponentId Source # | `mkComponentId` Since: Cabal-syntax-2.0.0.2
Instance details Defined in Distribution.Types.ComponentId Methods fromString :: String -> ComponentId #
Generic ComponentId Source # |

Instance details

Defined in Distribution.Types.ComponentId

Associated Types

type Rep ComponentId |
Instance details Defined in Distribution.Types.ComponentId type Rep ComponentId = D1 ('MetaData "ComponentId" "Distribution.Types.ComponentId" "Cabal-syntax-3.12.1.0-5c0e" 'True) (C1 ('MetaCons "ComponentId" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

Methods

from :: ComponentId -> Rep ComponentId x #

to :: Rep ComponentId x -> ComponentId #

Read ComponentId Source # |
Instance details Defined in Distribution.Types.ComponentId Methods readsPrec :: Int -> ReadS ComponentId # readList :: ReadS [ComponentId] # readPrec :: ReadPrec ComponentId # readListPrec :: ReadPrec [ComponentId] #
Show ComponentId Source # |
Instance details Defined in Distribution.Types.ComponentId Methods showsPrec :: Int -> ComponentId -> ShowS # show :: ComponentId -> String # showList :: [ComponentId] -> ShowS #
Eq ComponentId Source # |
Instance details Defined in Distribution.Types.ComponentId Methods (==) :: ComponentId -> ComponentId -> Bool # (/=) :: ComponentId -> ComponentId -> Bool #
Ord ComponentId Source # |
Instance details Defined in Distribution.Types.ComponentId Methods compare :: ComponentId -> ComponentId -> Ordering # (<) :: ComponentId -> ComponentId -> Bool # (<=) :: ComponentId -> ComponentId -> Bool # (>) :: ComponentId -> ComponentId -> Bool # (>=) :: ComponentId -> ComponentId -> Bool # max :: ComponentId -> ComponentId -> ComponentId # min :: ComponentId -> ComponentId -> ComponentId #
type Rep ComponentId Source # |
Instance details Defined in Distribution.Types.ComponentId type Rep ComponentId = D1 ('MetaData "ComponentId" "Distribution.Types.ComponentId" "Cabal-syntax-3.12.1.0-5c0e" 'True) (C1 ('MetaCons "ComponentId" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortText)))

unComponentId :: ComponentId -> String Source #

Convert `ComponentId` to `String`

Since: Cabal-syntax-2.0.0.2

mkComponentId :: String -> ComponentId Source #

Construct a `ComponentId` from a `String`

`mkComponentId` is the inverse to `unComponentId`

Note: No validations are performed to ensure that the resulting `ComponentId` is valid

Since: Cabal-syntax-2.0.0.2