Distribution.Types.ComponentName

Cabal-2.2.0.1: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Types.ComponentName

Synopsis

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

# Documentation

data ComponentName #

Constructors

CLibName |
CSubLibName UnqualComponentName |
CFLibName UnqualComponentName |
CExeName UnqualComponentName |
CTestName UnqualComponentName |
CBenchName UnqualComponentName |

Instances

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 :: * -> * 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 #
Text ComponentName # |
Instance details Defined in Distribution.Types.ComponentName Methods disp :: ComponentName -> Doc # parse :: ReadP r ComponentName #
type Rep ComponentName # |
Instance details Defined in Distribution.Types.ComponentName type Rep ComponentName = D1 (MetaData "ComponentName" "Distribution.Types.ComponentName" "Cabal-2.2.0.1" False) ((C1 (MetaCons "CLibName" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "CSubLibName" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UnqualComponentName)) :+: 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)))))

defaultLibName :: ComponentName #

libraryComponentName :: Maybe UnqualComponentName -> ComponentName #

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

showComponentName :: ComponentName -> String #

componentNameStanza :: ComponentName -> String #

componentNameString :: ComponentName -> Maybe UnqualComponentName #

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.