Distribution.Types.ComponentName

Cabal-3.1.0.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Types.ComponentName

Synopsis

- data ComponentName
  - = CLibName LibraryName
  - | CFLibName UnqualComponentName
  - | CExeName UnqualComponentName
  - | CTestName UnqualComponentName
  - | CBenchName UnqualComponentName
- showComponentName :: ComponentName -> String
- componentNameStanza :: ComponentName -> String
- componentNameString :: ComponentName -> Maybe UnqualComponentName

# Documentation

data ComponentName Source #

Constructors

CLibName LibraryName |
CFLibName UnqualComponentName |
CExeName UnqualComponentName |
CTestName UnqualComponentName |
CBenchName UnqualComponentName |

#### Instances

Instances details

Eq ComponentName # |
Instance details Defined in Distribution.Types.ComponentName Methods (==) :: ComponentName -> ComponentName -> Bool # (/=) :: ComponentName -> ComponentName -> Bool #
Ord ComponentName # |
Instance details Defined in Distribution.Types.ComponentName Methods compare :: ComponentName -> ComponentName -> Ordering # (<) :: ComponentName -> ComponentName -> Bool # (<=) :: ComponentName -> ComponentName -> Bool # (>) :: ComponentName -> ComponentName -> Bool # (>=) :: ComponentName -> ComponentName -> Bool # max :: ComponentName -> ComponentName -> ComponentName # min :: ComponentName -> ComponentName -> ComponentName #
Read ComponentName # |
Instance details Defined in Distribution.Types.ComponentName Methods readsPrec :: Int -> ReadS ComponentName Source # readList :: ReadS [ComponentName] Source # readPrec :: ReadPrec ComponentName Source # readListPrec :: ReadPrec [ComponentName] Source #
Show ComponentName # |
Instance details Defined in Distribution.Types.ComponentName Methods showsPrec :: Int -> ComponentName -> ShowS Source # show :: ComponentName -> String Source # showList :: [ComponentName] -> ShowS Source #
Generic ComponentName # |
Instance details Defined in Distribution.Types.ComponentName Associated Types type Rep ComponentName :: Type -> Type Source # Methods from :: ComponentName -> Rep ComponentName x Source # to :: Rep ComponentName x -> ComponentName Source #
Binary ComponentName # |
Instance details Defined in Distribution.Types.ComponentName Methods put :: ComponentName -> Put Source # get :: Get ComponentName Source # putList :: [ComponentName] -> Put Source #
Pretty ComponentName # |
Instance details Defined in Distribution.Types.ComponentName Methods pretty :: ComponentName -> Doc Source # prettyVersioned :: CabalSpecVersion -> ComponentName -> Doc Source #
Parsec ComponentName # |
Instance details Defined in Distribution.Types.ComponentName Methods parsec :: CabalParsing m => m ComponentName Source #
type Rep ComponentName # |
Instance details Defined in Distribution.Types.ComponentName type Rep ComponentName = D1 ('MetaData "ComponentName" "Distribution.Types.ComponentName" "Cabal-3.1.0.0" 'False) ((C1 ('MetaCons "CLibName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LibraryName)) :+: C1 ('MetaCons "CFLibName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnqualComponentName))) :+: (C1 ('MetaCons "CExeName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnqualComponentName)) :+: (C1 ('MetaCons "CTestName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnqualComponentName)) :+: C1 ('MetaCons "CBenchName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnqualComponentName)))))

showComponentName :: ComponentName -> String Source #

componentNameStanza :: ComponentName -> String Source #

componentNameString :: ComponentName -> Maybe UnqualComponentName Source #

This gets the underlying unqualified component name. In fact, it is guaranteed to uniquely identify a component, returning `Nothing` if the `ComponentName` was for the public library.