Cabal-syntax-3.8.0.20220526: A library for working with .cabal files
Safe HaskellSafe-Inferred
LanguageHaskell2010

Distribution.Types.UnqualComponentName

Synopsis

Documentation

data UnqualComponentName Source #

An unqualified component name, for any kind of component.

This is distinguished from a ComponentName and ComponentId. The former also states which of a library, executable, etc the name refers too. The later uniquely identifiers a component and its closure.

Since: Cabal-syntax-2.0.0.2

Instances

Instances details
Parsec UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Pretty UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Structured UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Data UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Methods

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

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

toConstr :: UnqualComponentName -> Constr Source #

dataTypeOf :: UnqualComponentName -> DataType Source #

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

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

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

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

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

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

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

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

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

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

IsString UnqualComponentName Source #

mkUnqualComponentName

Since: Cabal-syntax-2.0.0.2

Instance details

Defined in Distribution.Types.UnqualComponentName

Monoid UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Semigroup UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Generic UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Associated Types

type Rep UnqualComponentName :: Type -> Type Source #

Read UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Show UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Binary UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

NFData UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Eq UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Ord UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

type Rep UnqualComponentName Source # 
Instance details

Defined in Distribution.Types.UnqualComponentName

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

mkUnqualComponentName :: String -> UnqualComponentName Source #

Construct a UnqualComponentName from a String

mkUnqualComponentName is the inverse to unUnqualComponentName

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

Since: Cabal-syntax-2.0.0.2

packageNameToUnqualComponentName :: PackageName -> UnqualComponentName Source #

Converts a package name to an unqualified component name

Useful in legacy situations where a package name may refer to an internal component, if one is defined with that name.

2018-12-21: These "legacy" situations are not legacy. We can build-depends on the internal library. However Now dependency contains Set LibraryName, and we should use that.

Since: Cabal-syntax-2.0.0.2

unqualComponentNameToPackageName :: UnqualComponentName -> PackageName Source #

Converts an unqualified component name to a package name

packageNameToUnqualComponentName is the inverse of unqualComponentNameToPackageName.

Useful in legacy situations where a package name may refer to an internal component, if one is defined with that name.

Since: Cabal-syntax-2.0.0.2