Cabal-2.0.1.0: 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 # |
Methods (==) :: ComponentName -> ComponentName -> Bool # (/=) :: ComponentName -> ComponentName -> Bool #
Ord 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 # |
Methods readsPrec :: Int -> ReadS ComponentName Source # readList :: ReadS [ComponentName] Source # readPrec :: ReadPrec ComponentName Source # readListPrec :: ReadPrec [ComponentName] Source #
Show ComponentName # |
Methods showsPrec :: Int -> ComponentName -> ShowS Source # show :: ComponentName -> String Source # showList :: [ComponentName] -> ShowS Source #
Generic ComponentName # |
Associated Types type Rep ComponentName :: * -> * Source # Methods from :: ComponentName -> Rep ComponentName x Source # to :: Rep ComponentName x -> ComponentName Source #
Binary ComponentName # |
Methods put :: ComponentName -> Put Source # get :: Get ComponentName Source # putList :: [ComponentName] -> Put Source #
Text ComponentName # |
Methods disp :: ComponentName -> Doc # parse :: ReadP r ComponentName #
type Rep ComponentName # |

type Rep ComponentName = D1 * (MetaData "ComponentName" "Distribution.Types.ComponentName" "Cabal-2.0.1.0" False) ((:+:) * ((:+:) * (C1 * (MetaCons "CLibName" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "CSubLibName" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * UnqualComponentName))) (C1 * (MetaCons "CFLibName" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * UnqualComponentName))))) ((:+:) * (C1 * (MetaCons "CExeName" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * UnqualComponentName))) ((:+:) * (C1 * (MetaCons "CTestName" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * UnqualComponentName))) (C1 * (MetaCons "CBenchName" PrefixI False) (S1 * (MetaSel (Nothing 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.