{-# LANGUAGE Rank2Types #-}
module Distribution.Types.GenericPackageDescription.Lens
( GenericPackageDescription
, PackageFlag
, FlagName
, ConfVar (..)
, module Distribution.Types.GenericPackageDescription.Lens
) where
import Distribution.Compat.Lens
import Distribution.Compat.Prelude
import Prelude ()
import qualified Distribution.Types.GenericPackageDescription as T
import Distribution.Compiler (CompilerFlavor)
import Distribution.System (Arch, OS)
import Distribution.Types.Benchmark (Benchmark)
import Distribution.Types.CondTree (CondTree)
import Distribution.Types.ConfVar (ConfVar (..))
import Distribution.Types.Executable (Executable)
import Distribution.Types.Flag (FlagName, PackageFlag (MkPackageFlag))
import Distribution.Types.ForeignLib (ForeignLib)
import Distribution.Types.GenericPackageDescription (GenericPackageDescription (GenericPackageDescription))
import Distribution.Types.Library (Library)
import Distribution.Types.PackageDescription (PackageDescription)
import Distribution.Types.TestSuite (TestSuite)
import Distribution.Types.UnqualComponentName (UnqualComponentName)
import Distribution.Version (Version, VersionRange)
packageDescription :: Lens' GenericPackageDescription PackageDescription
packageDescription :: Lens' GenericPackageDescription PackageDescription
packageDescription PackageDescription -> f PackageDescription
f GenericPackageDescription
s = (PackageDescription -> GenericPackageDescription)
-> f PackageDescription -> f GenericPackageDescription
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\PackageDescription
x -> GenericPackageDescription
s{T.packageDescription = x}) (PackageDescription -> f PackageDescription
f (GenericPackageDescription -> PackageDescription
T.packageDescription GenericPackageDescription
s))
{-# INLINE packageDescription #-}
gpdScannedVersion :: Lens' GenericPackageDescription (Maybe Version)
gpdScannedVersion :: Lens' GenericPackageDescription (Maybe Version)
gpdScannedVersion Maybe Version -> f (Maybe Version)
f GenericPackageDescription
s = (Maybe Version -> GenericPackageDescription)
-> f (Maybe Version) -> f GenericPackageDescription
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\Maybe Version
x -> GenericPackageDescription
s{T.gpdScannedVersion = x}) (Maybe Version -> f (Maybe Version)
f (GenericPackageDescription -> Maybe Version
T.gpdScannedVersion GenericPackageDescription
s))
{-# INLINE gpdScannedVersion #-}
genPackageFlags :: Lens' GenericPackageDescription [PackageFlag]
genPackageFlags :: Lens' GenericPackageDescription [PackageFlag]
genPackageFlags [PackageFlag] -> f [PackageFlag]
f GenericPackageDescription
s = ([PackageFlag] -> GenericPackageDescription)
-> f [PackageFlag] -> f GenericPackageDescription
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\[PackageFlag]
x -> GenericPackageDescription
s{T.genPackageFlags = x}) ([PackageFlag] -> f [PackageFlag]
f (GenericPackageDescription -> [PackageFlag]
T.genPackageFlags GenericPackageDescription
s))
{-# INLINE genPackageFlags #-}
condLibrary :: Lens' GenericPackageDescription (Maybe (CondTree ConfVar Library))
condLibrary :: Lens' GenericPackageDescription (Maybe (CondTree ConfVar Library))
condLibrary Maybe (CondTree ConfVar Library)
-> f (Maybe (CondTree ConfVar Library))
f GenericPackageDescription
s = (Maybe (CondTree ConfVar Library) -> GenericPackageDescription)
-> f (Maybe (CondTree ConfVar Library))
-> f GenericPackageDescription
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\Maybe (CondTree ConfVar Library)
x -> GenericPackageDescription
s{T.condLibrary = x}) (Maybe (CondTree ConfVar Library)
-> f (Maybe (CondTree ConfVar Library))
f (GenericPackageDescription -> Maybe (CondTree ConfVar Library)
T.condLibrary GenericPackageDescription
s))
{-# INLINE condLibrary #-}
condSubLibraries :: Lens' GenericPackageDescription [(UnqualComponentName, CondTree ConfVar Library)]
condSubLibraries :: Lens'
GenericPackageDescription
[(UnqualComponentName, CondTree ConfVar Library)]
condSubLibraries [(UnqualComponentName, CondTree ConfVar Library)]
-> f [(UnqualComponentName, CondTree ConfVar Library)]
f GenericPackageDescription
s = ([(UnqualComponentName, CondTree ConfVar Library)]
-> GenericPackageDescription)
-> f [(UnqualComponentName, CondTree ConfVar Library)]
-> f GenericPackageDescription
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\[(UnqualComponentName, CondTree ConfVar Library)]
x -> GenericPackageDescription
s{T.condSubLibraries = x}) ([(UnqualComponentName, CondTree ConfVar Library)]
-> f [(UnqualComponentName, CondTree ConfVar Library)]
f (GenericPackageDescription
-> [(UnqualComponentName, CondTree ConfVar Library)]
T.condSubLibraries GenericPackageDescription
s))
{-# INLINE condSubLibraries #-}
condForeignLibs :: Lens' GenericPackageDescription [(UnqualComponentName, CondTree ConfVar ForeignLib)]
condForeignLibs :: Lens'
GenericPackageDescription
[(UnqualComponentName, CondTree ConfVar ForeignLib)]
condForeignLibs [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> f [(UnqualComponentName, CondTree ConfVar ForeignLib)]
f GenericPackageDescription
s = ([(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> GenericPackageDescription)
-> f [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> f GenericPackageDescription
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\[(UnqualComponentName, CondTree ConfVar ForeignLib)]
x -> GenericPackageDescription
s{T.condForeignLibs = x}) ([(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> f [(UnqualComponentName, CondTree ConfVar ForeignLib)]
f (GenericPackageDescription
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
T.condForeignLibs GenericPackageDescription
s))
{-# INLINE condForeignLibs #-}
condExecutables :: Lens' GenericPackageDescription [(UnqualComponentName, CondTree ConfVar Executable)]
condExecutables :: Lens'
GenericPackageDescription
[(UnqualComponentName, CondTree ConfVar Executable)]
condExecutables [(UnqualComponentName, CondTree ConfVar Executable)]
-> f [(UnqualComponentName, CondTree ConfVar Executable)]
f GenericPackageDescription
s = ([(UnqualComponentName, CondTree ConfVar Executable)]
-> GenericPackageDescription)
-> f [(UnqualComponentName, CondTree ConfVar Executable)]
-> f GenericPackageDescription
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\[(UnqualComponentName, CondTree ConfVar Executable)]
x -> GenericPackageDescription
s{T.condExecutables = x}) ([(UnqualComponentName, CondTree ConfVar Executable)]
-> f [(UnqualComponentName, CondTree ConfVar Executable)]
f (GenericPackageDescription
-> [(UnqualComponentName, CondTree ConfVar Executable)]
T.condExecutables GenericPackageDescription
s))
{-# INLINE condExecutables #-}
condTestSuites :: Lens' GenericPackageDescription [(UnqualComponentName, CondTree ConfVar TestSuite)]
condTestSuites :: Lens'
GenericPackageDescription
[(UnqualComponentName, CondTree ConfVar TestSuite)]
condTestSuites [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> f [(UnqualComponentName, CondTree ConfVar TestSuite)]
f GenericPackageDescription
s = ([(UnqualComponentName, CondTree ConfVar TestSuite)]
-> GenericPackageDescription)
-> f [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> f GenericPackageDescription
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\[(UnqualComponentName, CondTree ConfVar TestSuite)]
x -> GenericPackageDescription
s{T.condTestSuites = x}) ([(UnqualComponentName, CondTree ConfVar TestSuite)]
-> f [(UnqualComponentName, CondTree ConfVar TestSuite)]
f (GenericPackageDescription
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
T.condTestSuites GenericPackageDescription
s))
{-# INLINE condTestSuites #-}
condBenchmarks :: Lens' GenericPackageDescription [(UnqualComponentName, CondTree ConfVar Benchmark)]
condBenchmarks :: Lens'
GenericPackageDescription
[(UnqualComponentName, CondTree ConfVar Benchmark)]
condBenchmarks [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> f [(UnqualComponentName, CondTree ConfVar Benchmark)]
f GenericPackageDescription
s = ([(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
-> f [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> f GenericPackageDescription
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\[(UnqualComponentName, CondTree ConfVar Benchmark)]
x -> GenericPackageDescription
s{T.condBenchmarks = x}) ([(UnqualComponentName, CondTree ConfVar Benchmark)]
-> f [(UnqualComponentName, CondTree ConfVar Benchmark)]
f (GenericPackageDescription
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
T.condBenchmarks GenericPackageDescription
s))
{-# INLINE condBenchmarks #-}
allCondTrees
:: Applicative f
=> ( forall a
. CondTree ConfVar a
-> f (CondTree ConfVar a)
)
-> GenericPackageDescription
-> f GenericPackageDescription
allCondTrees :: forall (f :: * -> *).
Applicative f =>
(forall a. CondTree ConfVar a -> f (CondTree ConfVar a))
-> GenericPackageDescription -> f GenericPackageDescription
allCondTrees forall a. CondTree ConfVar a -> f (CondTree ConfVar a)
f (GenericPackageDescription PackageDescription
p Maybe Version
v [PackageFlag]
a1 Maybe (CondTree ConfVar Library)
x1 [(UnqualComponentName, CondTree ConfVar Library)]
x2 [(UnqualComponentName, CondTree ConfVar ForeignLib)]
x3 [(UnqualComponentName, CondTree ConfVar Executable)]
x4 [(UnqualComponentName, CondTree ConfVar TestSuite)]
x5 [(UnqualComponentName, CondTree ConfVar Benchmark)]
x6) =
(Maybe Version
-> [PackageFlag]
-> Maybe (CondTree ConfVar Library)
-> [(UnqualComponentName, CondTree ConfVar Library)]
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
-> f (Maybe Version
-> [PackageFlag]
-> Maybe (CondTree ConfVar Library)
-> [(UnqualComponentName, CondTree ConfVar Library)]
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PackageDescription
-> Maybe Version
-> [PackageFlag]
-> Maybe (CondTree ConfVar Library)
-> [(UnqualComponentName, CondTree ConfVar Library)]
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription
GenericPackageDescription PackageDescription
p)
f (Maybe Version
-> [PackageFlag]
-> Maybe (CondTree ConfVar Library)
-> [(UnqualComponentName, CondTree ConfVar Library)]
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
-> f (Maybe Version)
-> f ([PackageFlag]
-> Maybe (CondTree ConfVar Library)
-> [(UnqualComponentName, CondTree ConfVar Library)]
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
forall a b. f (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe Version -> f (Maybe Version)
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Maybe Version
v
f ([PackageFlag]
-> Maybe (CondTree ConfVar Library)
-> [(UnqualComponentName, CondTree ConfVar Library)]
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
-> f [PackageFlag]
-> f (Maybe (CondTree ConfVar Library)
-> [(UnqualComponentName, CondTree ConfVar Library)]
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
forall a b. f (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> [PackageFlag] -> f [PackageFlag]
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure [PackageFlag]
a1
f (Maybe (CondTree ConfVar Library)
-> [(UnqualComponentName, CondTree ConfVar Library)]
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
-> f (Maybe (CondTree ConfVar Library))
-> f ([(UnqualComponentName, CondTree ConfVar Library)]
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
forall a b. f (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (CondTree ConfVar Library -> f (CondTree ConfVar Library))
-> Maybe (CondTree ConfVar Library)
-> f (Maybe (CondTree ConfVar Library))
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Maybe a -> f (Maybe b)
traverse CondTree ConfVar Library -> f (CondTree ConfVar Library)
forall a. CondTree ConfVar a -> f (CondTree ConfVar a)
f Maybe (CondTree ConfVar Library)
x1
f ([(UnqualComponentName, CondTree ConfVar Library)]
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
-> f [(UnqualComponentName, CondTree ConfVar Library)]
-> f ([(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
forall a b. f (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (((UnqualComponentName, CondTree ConfVar Library)
-> f (UnqualComponentName, CondTree ConfVar Library))
-> [(UnqualComponentName, CondTree ConfVar Library)]
-> f [(UnqualComponentName, CondTree ConfVar Library)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (((UnqualComponentName, CondTree ConfVar Library)
-> f (UnqualComponentName, CondTree ConfVar Library))
-> [(UnqualComponentName, CondTree ConfVar Library)]
-> f [(UnqualComponentName, CondTree ConfVar Library)])
-> ((CondTree ConfVar Library -> f (CondTree ConfVar Library))
-> (UnqualComponentName, CondTree ConfVar Library)
-> f (UnqualComponentName, CondTree ConfVar Library))
-> (CondTree ConfVar Library -> f (CondTree ConfVar Library))
-> [(UnqualComponentName, CondTree ConfVar Library)]
-> f [(UnqualComponentName, CondTree ConfVar Library)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (CondTree ConfVar Library -> f (CondTree ConfVar Library))
-> (UnqualComponentName, CondTree ConfVar Library)
-> f (UnqualComponentName, CondTree ConfVar Library)
forall c a b (f :: * -> *).
Functor f =>
LensLike f (c, a) (c, b) a b
_2) CondTree ConfVar Library -> f (CondTree ConfVar Library)
forall a. CondTree ConfVar a -> f (CondTree ConfVar a)
f [(UnqualComponentName, CondTree ConfVar Library)]
x2
f ([(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
-> f [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> f ([(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
forall a b. f (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (((UnqualComponentName, CondTree ConfVar ForeignLib)
-> f (UnqualComponentName, CondTree ConfVar ForeignLib))
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> f [(UnqualComponentName, CondTree ConfVar ForeignLib)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (((UnqualComponentName, CondTree ConfVar ForeignLib)
-> f (UnqualComponentName, CondTree ConfVar ForeignLib))
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> f [(UnqualComponentName, CondTree ConfVar ForeignLib)])
-> ((CondTree ConfVar ForeignLib
-> f (CondTree ConfVar ForeignLib))
-> (UnqualComponentName, CondTree ConfVar ForeignLib)
-> f (UnqualComponentName, CondTree ConfVar ForeignLib))
-> (CondTree ConfVar ForeignLib -> f (CondTree ConfVar ForeignLib))
-> [(UnqualComponentName, CondTree ConfVar ForeignLib)]
-> f [(UnqualComponentName, CondTree ConfVar ForeignLib)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (CondTree ConfVar ForeignLib -> f (CondTree ConfVar ForeignLib))
-> (UnqualComponentName, CondTree ConfVar ForeignLib)
-> f (UnqualComponentName, CondTree ConfVar ForeignLib)
forall c a b (f :: * -> *).
Functor f =>
LensLike f (c, a) (c, b) a b
_2) CondTree ConfVar ForeignLib -> f (CondTree ConfVar ForeignLib)
forall a. CondTree ConfVar a -> f (CondTree ConfVar a)
f [(UnqualComponentName, CondTree ConfVar ForeignLib)]
x3
f ([(UnqualComponentName, CondTree ConfVar Executable)]
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
-> f [(UnqualComponentName, CondTree ConfVar Executable)]
-> f ([(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
forall a b. f (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (((UnqualComponentName, CondTree ConfVar Executable)
-> f (UnqualComponentName, CondTree ConfVar Executable))
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> f [(UnqualComponentName, CondTree ConfVar Executable)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (((UnqualComponentName, CondTree ConfVar Executable)
-> f (UnqualComponentName, CondTree ConfVar Executable))
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> f [(UnqualComponentName, CondTree ConfVar Executable)])
-> ((CondTree ConfVar Executable
-> f (CondTree ConfVar Executable))
-> (UnqualComponentName, CondTree ConfVar Executable)
-> f (UnqualComponentName, CondTree ConfVar Executable))
-> (CondTree ConfVar Executable -> f (CondTree ConfVar Executable))
-> [(UnqualComponentName, CondTree ConfVar Executable)]
-> f [(UnqualComponentName, CondTree ConfVar Executable)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (CondTree ConfVar Executable -> f (CondTree ConfVar Executable))
-> (UnqualComponentName, CondTree ConfVar Executable)
-> f (UnqualComponentName, CondTree ConfVar Executable)
forall c a b (f :: * -> *).
Functor f =>
LensLike f (c, a) (c, b) a b
_2) CondTree ConfVar Executable -> f (CondTree ConfVar Executable)
forall a. CondTree ConfVar a -> f (CondTree ConfVar a)
f [(UnqualComponentName, CondTree ConfVar Executable)]
x4
f ([(UnqualComponentName, CondTree ConfVar TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
-> f [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> f ([(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
forall a b. f (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (((UnqualComponentName, CondTree ConfVar TestSuite)
-> f (UnqualComponentName, CondTree ConfVar TestSuite))
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> f [(UnqualComponentName, CondTree ConfVar TestSuite)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (((UnqualComponentName, CondTree ConfVar TestSuite)
-> f (UnqualComponentName, CondTree ConfVar TestSuite))
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> f [(UnqualComponentName, CondTree ConfVar TestSuite)])
-> ((CondTree ConfVar TestSuite -> f (CondTree ConfVar TestSuite))
-> (UnqualComponentName, CondTree ConfVar TestSuite)
-> f (UnqualComponentName, CondTree ConfVar TestSuite))
-> (CondTree ConfVar TestSuite -> f (CondTree ConfVar TestSuite))
-> [(UnqualComponentName, CondTree ConfVar TestSuite)]
-> f [(UnqualComponentName, CondTree ConfVar TestSuite)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (CondTree ConfVar TestSuite -> f (CondTree ConfVar TestSuite))
-> (UnqualComponentName, CondTree ConfVar TestSuite)
-> f (UnqualComponentName, CondTree ConfVar TestSuite)
forall c a b (f :: * -> *).
Functor f =>
LensLike f (c, a) (c, b) a b
_2) CondTree ConfVar TestSuite -> f (CondTree ConfVar TestSuite)
forall a. CondTree ConfVar a -> f (CondTree ConfVar a)
f [(UnqualComponentName, CondTree ConfVar TestSuite)]
x5
f ([(UnqualComponentName, CondTree ConfVar Benchmark)]
-> GenericPackageDescription)
-> f [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> f GenericPackageDescription
forall a b. f (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (((UnqualComponentName, CondTree ConfVar Benchmark)
-> f (UnqualComponentName, CondTree ConfVar Benchmark))
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> f [(UnqualComponentName, CondTree ConfVar Benchmark)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> [a] -> f [b]
traverse (((UnqualComponentName, CondTree ConfVar Benchmark)
-> f (UnqualComponentName, CondTree ConfVar Benchmark))
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> f [(UnqualComponentName, CondTree ConfVar Benchmark)])
-> ((CondTree ConfVar Benchmark -> f (CondTree ConfVar Benchmark))
-> (UnqualComponentName, CondTree ConfVar Benchmark)
-> f (UnqualComponentName, CondTree ConfVar Benchmark))
-> (CondTree ConfVar Benchmark -> f (CondTree ConfVar Benchmark))
-> [(UnqualComponentName, CondTree ConfVar Benchmark)]
-> f [(UnqualComponentName, CondTree ConfVar Benchmark)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (CondTree ConfVar Benchmark -> f (CondTree ConfVar Benchmark))
-> (UnqualComponentName, CondTree ConfVar Benchmark)
-> f (UnqualComponentName, CondTree ConfVar Benchmark)
forall c a b (f :: * -> *).
Functor f =>
LensLike f (c, a) (c, b) a b
_2) CondTree ConfVar Benchmark -> f (CondTree ConfVar Benchmark)
forall a. CondTree ConfVar a -> f (CondTree ConfVar a)
f [(UnqualComponentName, CondTree ConfVar Benchmark)]
x6
flagName :: Lens' PackageFlag FlagName
flagName :: Lens' PackageFlag FlagName
flagName FlagName -> f FlagName
f (MkPackageFlag FlagName
x1 String
x2 Bool
x3 Bool
x4) = (FlagName -> PackageFlag) -> f FlagName -> f PackageFlag
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\FlagName
y1 -> FlagName -> String -> Bool -> Bool -> PackageFlag
MkPackageFlag FlagName
y1 String
x2 Bool
x3 Bool
x4) (FlagName -> f FlagName
f FlagName
x1)
{-# INLINE flagName #-}
flagDescription :: Lens' PackageFlag String
flagDescription :: Lens' PackageFlag String
flagDescription String -> f String
f (MkPackageFlag FlagName
x1 String
x2 Bool
x3 Bool
x4) = (String -> PackageFlag) -> f String -> f PackageFlag
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\String
y1 -> FlagName -> String -> Bool -> Bool -> PackageFlag
MkPackageFlag FlagName
x1 String
y1 Bool
x3 Bool
x4) (String -> f String
f String
x2)
{-# INLINE flagDescription #-}
flagDefault :: Lens' PackageFlag Bool
flagDefault :: Lens' PackageFlag Bool
flagDefault Bool -> f Bool
f (MkPackageFlag FlagName
x1 String
x2 Bool
x3 Bool
x4) = (Bool -> PackageFlag) -> f Bool -> f PackageFlag
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\Bool
y1 -> FlagName -> String -> Bool -> Bool -> PackageFlag
MkPackageFlag FlagName
x1 String
x2 Bool
y1 Bool
x4) (Bool -> f Bool
f Bool
x3)
{-# INLINE flagDefault #-}
flagManual :: Lens' PackageFlag Bool
flagManual :: Lens' PackageFlag Bool
flagManual Bool -> f Bool
f (MkPackageFlag FlagName
x1 String
x2 Bool
x3 Bool
x4) = (Bool -> PackageFlag) -> f Bool -> f PackageFlag
forall a b. (a -> b) -> f a -> f b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\Bool
y1 -> FlagName -> String -> Bool -> Bool -> PackageFlag
MkPackageFlag FlagName
x1 String
x2 Bool
x3 Bool
y1) (Bool -> f Bool
f Bool
x4)
{-# INLINE flagManual #-}
_OS :: Traversal' ConfVar OS
_OS :: Traversal' ConfVar OS
_OS OS -> f OS
f (OS OS
os) = OS -> ConfVar
OS (OS -> ConfVar) -> f OS -> f ConfVar
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> OS -> f OS
f OS
os
_OS OS -> f OS
_ ConfVar
x = ConfVar -> f ConfVar
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ConfVar
x
_Arch :: Traversal' ConfVar Arch
_Arch :: Traversal' ConfVar Arch
_Arch Arch -> f Arch
f (Arch Arch
arch) = Arch -> ConfVar
Arch (Arch -> ConfVar) -> f Arch -> f ConfVar
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Arch -> f Arch
f Arch
arch
_Arch Arch -> f Arch
_ ConfVar
x = ConfVar -> f ConfVar
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ConfVar
x
_PackageFlag :: Traversal' ConfVar FlagName
_PackageFlag :: Traversal' ConfVar FlagName
_PackageFlag FlagName -> f FlagName
f (PackageFlag FlagName
flag) = FlagName -> ConfVar
PackageFlag (FlagName -> ConfVar) -> f FlagName -> f ConfVar
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> FlagName -> f FlagName
f FlagName
flag
_PackageFlag FlagName -> f FlagName
_ ConfVar
x = ConfVar -> f ConfVar
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ConfVar
x
_Impl :: Traversal' ConfVar (CompilerFlavor, VersionRange)
_Impl :: Traversal' ConfVar (CompilerFlavor, VersionRange)
_Impl (CompilerFlavor, VersionRange) -> f (CompilerFlavor, VersionRange)
f (Impl CompilerFlavor
cf VersionRange
vr) = (CompilerFlavor -> VersionRange -> ConfVar)
-> (CompilerFlavor, VersionRange) -> ConfVar
forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry CompilerFlavor -> VersionRange -> ConfVar
Impl ((CompilerFlavor, VersionRange) -> ConfVar)
-> f (CompilerFlavor, VersionRange) -> f ConfVar
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (CompilerFlavor, VersionRange) -> f (CompilerFlavor, VersionRange)
f (CompilerFlavor
cf, VersionRange
vr)
_Impl (CompilerFlavor, VersionRange) -> f (CompilerFlavor, VersionRange)
_ ConfVar
x = ConfVar -> f ConfVar
forall a. a -> f a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ConfVar
x