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

Safe Haskell | None
Language | Haskell2010

Distribution.Types.SourceRepo.Lens

Synopsis

- data SourceRepo
- repoKind :: Lens' SourceRepo RepoKind
- repoType :: Lens' SourceRepo (Maybe RepoType)
- repoLocation :: Lens' SourceRepo (Maybe String)
- repoModule :: Lens' SourceRepo (Maybe String)
- repoBranch :: Lens' SourceRepo (Maybe String)
- repoTag :: Lens' SourceRepo (Maybe String)
- repoSubdir :: Lens' SourceRepo (Maybe FilePath)

# Documentation

data SourceRepo Source #

Information about the source revision control system for a package.

When specifying a repo it is useful to know the meaning or intention of the information as doing so enables automation. There are two obvious common purposes: one is to find the repo for the latest development version, the other is to find the repo for this specific release. The `ReopKind` specifies which one we mean (or another custom one).

A package can specify one or the other kind or both. Most will specify just a head repo but some may want to specify a repo to reconstruct the sources for this package release.

The required information is the `RepoType` which tells us if it's using `Darcs`, `Git` for example. The `repoLocation` and other details are interpreted according to the repo type.

#### Instances

Instances details

Structured SourceRepo Source # |
Instance details Defined in Distribution.Types.SourceRepo Methods structure :: Proxy SourceRepo -> Structure Source # structureHash' :: Tagged SourceRepo MD5
Binary SourceRepo Source # |
Instance details Defined in Distribution.Types.SourceRepo Methods put :: SourceRepo -> Put Source # get :: Get SourceRepo Source # putList :: [SourceRepo] -> Put Source #
NFData SourceRepo Source # |
Instance details Defined in Distribution.Types.SourceRepo Methods rnf :: SourceRepo -> () Source #
Data SourceRepo Source # |

Instance details

Defined in Distribution.Types.SourceRepo

Methods

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

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

toConstr :: SourceRepo -> Constr #

dataTypeOf :: SourceRepo -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic SourceRepo Source # |

Instance details

Defined in Distribution.Types.SourceRepo

Associated Types

type Rep SourceRepo |

Instance details

Defined in Distribution.Types.SourceRepo

type Rep SourceRepo = D1 ('MetaData "SourceRepo" "Distribution.Types.SourceRepo" "Cabal-syntax-3.12.1.0-5c0e" 'False) (C1 ('MetaCons "SourceRepo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "repoKind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RepoKind) :*: (S1 ('MetaSel ('Just "repoType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe RepoType)) :*: S1 ('MetaSel ('Just "repoLocation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)))) :*: ((S1 ('MetaSel ('Just "repoModule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Just "repoBranch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String))) :*: (S1 ('MetaSel ('Just "repoTag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Just "repoSubdir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath))))))

Methods

from :: SourceRepo -> Rep SourceRepo x #

to :: Rep SourceRepo x -> SourceRepo #

Read SourceRepo Source # |
Instance details Defined in Distribution.Types.SourceRepo Methods readsPrec :: Int -> ReadS SourceRepo # readList :: ReadS [SourceRepo] # readPrec :: ReadPrec SourceRepo # readListPrec :: ReadPrec [SourceRepo] #
Show SourceRepo Source # |
Instance details Defined in Distribution.Types.SourceRepo Methods showsPrec :: Int -> SourceRepo -> ShowS # show :: SourceRepo -> String # showList :: [SourceRepo] -> ShowS #
Eq SourceRepo Source # |
Instance details Defined in Distribution.Types.SourceRepo Methods (==) :: SourceRepo -> SourceRepo -> Bool # (/=) :: SourceRepo -> SourceRepo -> Bool #
Ord SourceRepo Source # |
Instance details Defined in Distribution.Types.SourceRepo Methods compare :: SourceRepo -> SourceRepo -> Ordering # (<) :: SourceRepo -> SourceRepo -> Bool # (<=) :: SourceRepo -> SourceRepo -> Bool # (>) :: SourceRepo -> SourceRepo -> Bool # (>=) :: SourceRepo -> SourceRepo -> Bool # max :: SourceRepo -> SourceRepo -> SourceRepo # min :: SourceRepo -> SourceRepo -> SourceRepo #
type Rep SourceRepo Source # |

Instance details

Defined in Distribution.Types.SourceRepo

type Rep SourceRepo = D1 ('MetaData "SourceRepo" "Distribution.Types.SourceRepo" "Cabal-syntax-3.12.1.0-5c0e" 'False) (C1 ('MetaCons "SourceRepo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "repoKind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RepoKind) :*: (S1 ('MetaSel ('Just "repoType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe RepoType)) :*: S1 ('MetaSel ('Just "repoLocation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)))) :*: ((S1 ('MetaSel ('Just "repoModule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Just "repoBranch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String))) :*: (S1 ('MetaSel ('Just "repoTag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Just "repoSubdir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath))))))

repoKind :: Lens' SourceRepo RepoKind Source #

repoType :: Lens' SourceRepo (Maybe RepoType) Source #

repoLocation :: Lens' SourceRepo (Maybe String) Source #

repoModule :: Lens' SourceRepo (Maybe String) Source #

repoBranch :: Lens' SourceRepo (Maybe String) Source #

repoTag :: Lens' SourceRepo (Maybe String) Source #

repoSubdir :: Lens' SourceRepo (Maybe FilePath) Source #