Distribution.Types.LibraryName

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

Safe Haskell | None
Language | Haskell2010

Distribution.Types.LibraryName

Contents

- Pretty & Parse

Synopsis

- data LibraryName
  - = LMainLibName
  - | LSubLibName UnqualComponentName
- defaultLibName :: LibraryName
- maybeToLibraryName :: Maybe UnqualComponentName -> LibraryName
- showLibraryName :: LibraryName -> String
- libraryNameStanza :: LibraryName -> String
- libraryNameString :: LibraryName -> Maybe UnqualComponentName
- prettyLibraryNameComponent :: LibraryName -> Doc
- parsecLibraryNameComponent :: CabalParsing m => m LibraryName

# Documentation

data LibraryName Source #

Constructors

LMainLibName |
LSubLibName UnqualComponentName |

#### Instances

Instances details

Structured LibraryName Source # |
Instance details Defined in Distribution.Types.LibraryName Methods structure :: Proxy LibraryName -> Structure Source # structureHash' :: Tagged LibraryName MD5
Binary LibraryName Source # |
Instance details Defined in Distribution.Types.LibraryName Methods put :: LibraryName -> Put Source # get :: Get LibraryName Source # putList :: [LibraryName] -> Put Source #
NFData LibraryName Source # |
Instance details Defined in Distribution.Types.LibraryName Methods rnf :: LibraryName -> () Source #
Data LibraryName Source # |
Instance details Defined in Distribution.Types.LibraryName Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LibraryName -> c LibraryName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LibraryName # toConstr :: LibraryName -> Constr # dataTypeOf :: LibraryName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LibraryName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LibraryName) # gmapT :: (forall b. Data b => b -> b) -> LibraryName -> LibraryName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LibraryName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LibraryName -> r # gmapQ :: (forall d. Data d => d -> u) -> LibraryName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LibraryName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LibraryName -> m LibraryName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LibraryName -> m LibraryName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LibraryName -> m LibraryName #
Generic LibraryName Source # |
Instance details Defined in Distribution.Types.LibraryName Associated Types
type Rep LibraryName |
Instance details Defined in Distribution.Types.LibraryName type Rep LibraryName = D1 ('MetaData "LibraryName" "Distribution.Types.LibraryName" "Cabal-syntax-3.11.0.0-f9cc" 'False) (C1 ('MetaCons "LMainLibName" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LSubLibName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnqualComponentName)))
Methods from :: LibraryName -> Rep LibraryName x # to :: Rep LibraryName x -> LibraryName #
Read LibraryName Source # |
Instance details Defined in Distribution.Types.LibraryName Methods readsPrec :: Int -> ReadS LibraryName # readList :: ReadS [LibraryName] # readPrec :: ReadPrec LibraryName # readListPrec :: ReadPrec [LibraryName] #
Show LibraryName Source # |
Instance details Defined in Distribution.Types.LibraryName Methods showsPrec :: Int -> LibraryName -> ShowS # show :: LibraryName -> String # showList :: [LibraryName] -> ShowS #
Eq LibraryName Source # |
Instance details Defined in Distribution.Types.LibraryName Methods (==) :: LibraryName -> LibraryName -> Bool # (/=) :: LibraryName -> LibraryName -> Bool #
Ord LibraryName Source # |
Instance details Defined in Distribution.Types.LibraryName Methods compare :: LibraryName -> LibraryName -> Ordering # (<) :: LibraryName -> LibraryName -> Bool # (<=) :: LibraryName -> LibraryName -> Bool # (>) :: LibraryName -> LibraryName -> Bool # (>=) :: LibraryName -> LibraryName -> Bool # max :: LibraryName -> LibraryName -> LibraryName # min :: LibraryName -> LibraryName -> LibraryName #
type Rep LibraryName Source # |
Instance details Defined in Distribution.Types.LibraryName type Rep LibraryName = D1 ('MetaData "LibraryName" "Distribution.Types.LibraryName" "Cabal-syntax-3.11.0.0-f9cc" 'False) (C1 ('MetaCons "LMainLibName" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LSubLibName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnqualComponentName)))

defaultLibName :: LibraryName Source #

maybeToLibraryName :: Maybe UnqualComponentName -> LibraryName Source #

Convert the `UnqualComponentName` of a library into a `LibraryName`.

showLibraryName :: LibraryName -> String Source #

libraryNameStanza :: LibraryName -> String Source #

libraryNameString :: LibraryName -> Maybe UnqualComponentName Source #

# Pretty & Parse

prettyLibraryNameComponent :: LibraryName -> Doc Source #

Pretty print `LibraryName` in build-target-ish syntax.

Note: there are no `Pretty` or `Parsec` instances, as there's other way to represent `LibraryName`, namely as bare `UnqualComponentName`.

parsecLibraryNameComponent :: CabalParsing m => m LibraryName Source #