module Distribution.Types.SourceRepo.Lens (
    T.SourceRepo,
    module Distribution.Types.SourceRepo.Lens,
    ) where

import Prelude()
import Distribution.Compat.Prelude
import Distribution.Compat.Lens

import Distribution.Types.SourceRepo (SourceRepo, RepoKind, RepoType)
import qualified Distribution.Types.SourceRepo as T

repoKind :: Lens' SourceRepo RepoKind
repoKind :: Lens' SourceRepo RepoKind
repoKind RepoKind -> f RepoKind
f SourceRepo
s = (RepoKind -> SourceRepo) -> f RepoKind -> f SourceRepo
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\RepoKind
x -> SourceRepo
s { repoKind :: RepoKind
T.repoKind = RepoKind
x }) (RepoKind -> f RepoKind
f (SourceRepo -> RepoKind
T.repoKind SourceRepo
s))
{-# INLINE repoKind #-}

repoType :: Lens' SourceRepo (Maybe RepoType)
repoType :: Lens' SourceRepo (Maybe RepoType)
repoType Maybe RepoType -> f (Maybe RepoType)
f SourceRepo
s = (Maybe RepoType -> SourceRepo)
-> f (Maybe RepoType) -> f SourceRepo
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\Maybe RepoType
x -> SourceRepo
s { repoType :: Maybe RepoType
T.repoType = Maybe RepoType
x }) (Maybe RepoType -> f (Maybe RepoType)
f (SourceRepo -> Maybe RepoType
T.repoType SourceRepo
s))
{-# INLINE repoType #-}

repoLocation :: Lens' SourceRepo (Maybe String)
repoLocation :: Lens' SourceRepo (Maybe String)
repoLocation Maybe String -> f (Maybe String)
f SourceRepo
s = (Maybe String -> SourceRepo) -> f (Maybe String) -> f SourceRepo
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\Maybe String
x -> SourceRepo
s { repoLocation :: Maybe String
T.repoLocation = Maybe String
x }) (Maybe String -> f (Maybe String)
f (SourceRepo -> Maybe String
T.repoLocation SourceRepo
s))
{-# INLINE repoLocation #-}

repoModule :: Lens' SourceRepo (Maybe String)
repoModule :: Lens' SourceRepo (Maybe String)
repoModule Maybe String -> f (Maybe String)
f SourceRepo
s = (Maybe String -> SourceRepo) -> f (Maybe String) -> f SourceRepo
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\Maybe String
x -> SourceRepo
s { repoModule :: Maybe String
T.repoModule = Maybe String
x }) (Maybe String -> f (Maybe String)
f (SourceRepo -> Maybe String
T.repoModule SourceRepo
s))
{-# INLINE repoModule #-}

repoBranch :: Lens' SourceRepo (Maybe String)
repoBranch :: Lens' SourceRepo (Maybe String)
repoBranch Maybe String -> f (Maybe String)
f SourceRepo
s = (Maybe String -> SourceRepo) -> f (Maybe String) -> f SourceRepo
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\Maybe String
x -> SourceRepo
s { repoBranch :: Maybe String
T.repoBranch = Maybe String
x }) (Maybe String -> f (Maybe String)
f (SourceRepo -> Maybe String
T.repoBranch SourceRepo
s))
{-# INLINE repoBranch #-}

repoTag :: Lens' SourceRepo (Maybe String)
repoTag :: Lens' SourceRepo (Maybe String)
repoTag Maybe String -> f (Maybe String)
f SourceRepo
s = (Maybe String -> SourceRepo) -> f (Maybe String) -> f SourceRepo
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\Maybe String
x -> SourceRepo
s { repoTag :: Maybe String
T.repoTag = Maybe String
x }) (Maybe String -> f (Maybe String)
f (SourceRepo -> Maybe String
T.repoTag SourceRepo
s))
{-# INLINE repoTag #-}

repoSubdir :: Lens' SourceRepo (Maybe FilePath)
repoSubdir :: Lens' SourceRepo (Maybe String)
repoSubdir Maybe String -> f (Maybe String)
f SourceRepo
s = (Maybe String -> SourceRepo) -> f (Maybe String) -> f SourceRepo
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\Maybe String
x -> SourceRepo
s { repoSubdir :: Maybe String
T.repoSubdir = Maybe String
x }) (Maybe String -> f (Maybe String)
f (SourceRepo -> Maybe String
T.repoSubdir SourceRepo
s))
{-# INLINE repoSubdir #-}