{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Distribution.Types.GenericPackageDescription (
GenericPackageDescription(..),
emptyGenericPackageDescription,
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Compat.Lens as L
import qualified Distribution.Types.BuildInfo.Lens as L
import Distribution.Types.PackageDescription
import Distribution.Types.Benchmark
import Distribution.Types.CondTree
import Distribution.Types.ConfVar
import Distribution.Types.Dependency
import Distribution.Types.Executable
import Distribution.Types.Flag
import Distribution.Types.ForeignLib
import Distribution.Types.Library
import Distribution.Types.TestSuite
import Distribution.Types.UnqualComponentName
import Distribution.Package
import Distribution.Version
data GenericPackageDescription =
GenericPackageDescription
{ GenericPackageDescription -> PackageDescription
packageDescription :: PackageDescription
, GenericPackageDescription -> Maybe Version
gpdScannedVersion :: Maybe Version
, GenericPackageDescription -> [PackageFlag]
genPackageFlags :: [PackageFlag]
, GenericPackageDescription
-> Maybe (CondTree ConfVar [Dependency] Library)
condLibrary :: Maybe (CondTree ConfVar [Dependency] Library)
, GenericPackageDescription
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
condSubLibraries :: [( UnqualComponentName
, CondTree ConfVar [Dependency] Library )]
, GenericPackageDescription
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
condForeignLibs :: [( UnqualComponentName
, CondTree ConfVar [Dependency] ForeignLib )]
, GenericPackageDescription
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
condExecutables :: [( UnqualComponentName
, CondTree ConfVar [Dependency] Executable )]
, GenericPackageDescription
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
condTestSuites :: [( UnqualComponentName
, CondTree ConfVar [Dependency] TestSuite )]
, GenericPackageDescription
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
condBenchmarks :: [( UnqualComponentName
, CondTree ConfVar [Dependency] Benchmark )]
}
deriving (Int -> GenericPackageDescription -> ShowS
[GenericPackageDescription] -> ShowS
GenericPackageDescription -> String
(Int -> GenericPackageDescription -> ShowS)
-> (GenericPackageDescription -> String)
-> ([GenericPackageDescription] -> ShowS)
-> Show GenericPackageDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GenericPackageDescription] -> ShowS
$cshowList :: [GenericPackageDescription] -> ShowS
show :: GenericPackageDescription -> String
$cshow :: GenericPackageDescription -> String
showsPrec :: Int -> GenericPackageDescription -> ShowS
$cshowsPrec :: Int -> GenericPackageDescription -> ShowS
Show, GenericPackageDescription -> GenericPackageDescription -> Bool
(GenericPackageDescription -> GenericPackageDescription -> Bool)
-> (GenericPackageDescription -> GenericPackageDescription -> Bool)
-> Eq GenericPackageDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GenericPackageDescription -> GenericPackageDescription -> Bool
$c/= :: GenericPackageDescription -> GenericPackageDescription -> Bool
== :: GenericPackageDescription -> GenericPackageDescription -> Bool
$c== :: GenericPackageDescription -> GenericPackageDescription -> Bool
Eq, Typeable, Typeable GenericPackageDescription
Typeable GenericPackageDescription
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> GenericPackageDescription
-> c GenericPackageDescription)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GenericPackageDescription)
-> (GenericPackageDescription -> Constr)
-> (GenericPackageDescription -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c GenericPackageDescription))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c GenericPackageDescription))
-> ((forall b. Data b => b -> b)
-> GenericPackageDescription -> GenericPackageDescription)
-> (forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> GenericPackageDescription
-> r)
-> (forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> GenericPackageDescription
-> r)
-> (forall u.
(forall d. Data d => d -> u) -> GenericPackageDescription -> [u])
-> (forall u.
Int
-> (forall d. Data d => d -> u) -> GenericPackageDescription -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> GenericPackageDescription -> m GenericPackageDescription)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> GenericPackageDescription -> m GenericPackageDescription)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> GenericPackageDescription -> m GenericPackageDescription)
-> Data GenericPackageDescription
GenericPackageDescription -> DataType
GenericPackageDescription -> Constr
(forall b. Data b => b -> b)
-> GenericPackageDescription -> GenericPackageDescription
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u) -> GenericPackageDescription -> u
forall u.
(forall d. Data d => d -> u) -> GenericPackageDescription -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> GenericPackageDescription
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> GenericPackageDescription
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> GenericPackageDescription -> m GenericPackageDescription
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> GenericPackageDescription -> m GenericPackageDescription
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GenericPackageDescription
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> GenericPackageDescription
-> c GenericPackageDescription
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c GenericPackageDescription)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c GenericPackageDescription)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> GenericPackageDescription -> m GenericPackageDescription
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> GenericPackageDescription -> m GenericPackageDescription
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> GenericPackageDescription -> m GenericPackageDescription
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> GenericPackageDescription -> m GenericPackageDescription
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> GenericPackageDescription -> m GenericPackageDescription
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> GenericPackageDescription -> m GenericPackageDescription
gmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> GenericPackageDescription -> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> GenericPackageDescription -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> GenericPackageDescription -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> GenericPackageDescription -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> GenericPackageDescription
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> GenericPackageDescription
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> GenericPackageDescription
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> GenericPackageDescription
-> r
gmapT :: (forall b. Data b => b -> b)
-> GenericPackageDescription -> GenericPackageDescription
$cgmapT :: (forall b. Data b => b -> b)
-> GenericPackageDescription -> GenericPackageDescription
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c GenericPackageDescription)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c GenericPackageDescription)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c GenericPackageDescription)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c GenericPackageDescription)
dataTypeOf :: GenericPackageDescription -> DataType
$cdataTypeOf :: GenericPackageDescription -> DataType
toConstr :: GenericPackageDescription -> Constr
$ctoConstr :: GenericPackageDescription -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GenericPackageDescription
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GenericPackageDescription
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> GenericPackageDescription
-> c GenericPackageDescription
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> GenericPackageDescription
-> c GenericPackageDescription
Data, (forall x.
GenericPackageDescription -> Rep GenericPackageDescription x)
-> (forall x.
Rep GenericPackageDescription x -> GenericPackageDescription)
-> Generic GenericPackageDescription
forall x.
Rep GenericPackageDescription x -> GenericPackageDescription
forall x.
GenericPackageDescription -> Rep GenericPackageDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GenericPackageDescription x -> GenericPackageDescription
$cfrom :: forall x.
GenericPackageDescription -> Rep GenericPackageDescription x
Generic)
instance Package GenericPackageDescription where
packageId :: GenericPackageDescription -> PackageIdentifier
packageId = PackageDescription -> PackageIdentifier
forall pkg. Package pkg => pkg -> PackageIdentifier
packageId (PackageDescription -> PackageIdentifier)
-> (GenericPackageDescription -> PackageDescription)
-> GenericPackageDescription
-> PackageIdentifier
forall b c a. (b -> c) -> (a -> b) -> a -> c
. GenericPackageDescription -> PackageDescription
packageDescription
instance Binary GenericPackageDescription
instance Structured GenericPackageDescription
instance NFData GenericPackageDescription where rnf :: GenericPackageDescription -> ()
rnf = GenericPackageDescription -> ()
forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf
emptyGenericPackageDescription :: GenericPackageDescription
emptyGenericPackageDescription :: GenericPackageDescription
emptyGenericPackageDescription = PackageDescription
-> Maybe Version
-> [PackageFlag]
-> Maybe (CondTree ConfVar [Dependency] Library)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription
GenericPackageDescription PackageDescription
emptyPackageDescription Maybe Version
forall a. Maybe a
Nothing [] Maybe (CondTree ConfVar [Dependency] Library)
forall a. Maybe a
Nothing [] [] [] [] []
instance L.HasBuildInfos GenericPackageDescription where
traverseBuildInfos :: Traversal' GenericPackageDescription BuildInfo
traverseBuildInfos BuildInfo -> f BuildInfo
f (GenericPackageDescription PackageDescription
p Maybe Version
v [PackageFlag]
a1 Maybe (CondTree ConfVar [Dependency] Library)
x1 [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
x2 [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)]
x3 [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]
x4 [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
x5 [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
x6) =
PackageDescription
-> Maybe Version
-> [PackageFlag]
-> Maybe (CondTree ConfVar [Dependency] Library)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription
GenericPackageDescription
(PackageDescription
-> Maybe Version
-> [PackageFlag]
-> Maybe (CondTree ConfVar [Dependency] Library)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
-> f PackageDescription
-> f (Maybe Version
-> [PackageFlag]
-> Maybe (CondTree ConfVar [Dependency] Library)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> LensLike
f PackageDescription PackageDescription BuildInfo BuildInfo
forall a. HasBuildInfos a => Traversal' a BuildInfo
L.traverseBuildInfos BuildInfo -> f BuildInfo
f PackageDescription
p
f (Maybe Version
-> [PackageFlag]
-> Maybe (CondTree ConfVar [Dependency] Library)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
-> f (Maybe Version)
-> f ([PackageFlag]
-> Maybe (CondTree ConfVar [Dependency] Library)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe Version -> f (Maybe Version)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Maybe Version
v
f ([PackageFlag]
-> Maybe (CondTree ConfVar [Dependency] Library)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
-> f [PackageFlag]
-> f (Maybe (CondTree ConfVar [Dependency] Library)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> [PackageFlag] -> f [PackageFlag]
forall (f :: * -> *) a. Applicative f => a -> f a
pure [PackageFlag]
a1
f (Maybe (CondTree ConfVar [Dependency] Library)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
-> f (Maybe (CondTree ConfVar [Dependency] Library))
-> f ([(UnqualComponentName,
CondTree ConfVar [Dependency] Library)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ((CondTree ConfVar [Dependency] Library
-> f (CondTree ConfVar [Dependency] Library))
-> Maybe (CondTree ConfVar [Dependency] Library)
-> f (Maybe (CondTree ConfVar [Dependency] Library))
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((CondTree ConfVar [Dependency] Library
-> f (CondTree ConfVar [Dependency] Library))
-> Maybe (CondTree ConfVar [Dependency] Library)
-> f (Maybe (CondTree ConfVar [Dependency] Library)))
-> ((BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Library
-> f (CondTree ConfVar [Dependency] Library))
-> (BuildInfo -> f BuildInfo)
-> Maybe (CondTree ConfVar [Dependency] Library)
-> f (Maybe (CondTree ConfVar [Dependency] Library))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Library
-> f (CondTree ConfVar [Dependency] Library)
forall (f :: * -> *) comp v.
(Applicative f, HasBuildInfo comp) =>
LensLike' f (CondTree v [Dependency] comp) BuildInfo
traverseCondTreeBuildInfo) BuildInfo -> f BuildInfo
f Maybe (CondTree ConfVar [Dependency] Library)
x1
f ([(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
-> f [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> f ([(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (((UnqualComponentName, CondTree ConfVar [Dependency] Library)
-> f (UnqualComponentName, CondTree ConfVar [Dependency] Library))
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> f [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (((UnqualComponentName, CondTree ConfVar [Dependency] Library)
-> f (UnqualComponentName, CondTree ConfVar [Dependency] Library))
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] Library)])
-> ((BuildInfo -> f BuildInfo)
-> (UnqualComponentName, CondTree ConfVar [Dependency] Library)
-> f (UnqualComponentName, CondTree ConfVar [Dependency] Library))
-> (BuildInfo -> f BuildInfo)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
-> f [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLike
f
(UnqualComponentName, CondTree ConfVar [Dependency] Library)
(UnqualComponentName, CondTree ConfVar [Dependency] Library)
(CondTree ConfVar [Dependency] Library)
(CondTree ConfVar [Dependency] Library)
forall c a b. Lens (c, a) (c, b) a b
L._2 LensLike
f
(UnqualComponentName, CondTree ConfVar [Dependency] Library)
(UnqualComponentName, CondTree ConfVar [Dependency] Library)
(CondTree ConfVar [Dependency] Library)
(CondTree ConfVar [Dependency] Library)
-> ((BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Library
-> f (CondTree ConfVar [Dependency] Library))
-> (BuildInfo -> f BuildInfo)
-> (UnqualComponentName, CondTree ConfVar [Dependency] Library)
-> f (UnqualComponentName, CondTree ConfVar [Dependency] Library)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Library
-> f (CondTree ConfVar [Dependency] Library)
forall (f :: * -> *) comp v.
(Applicative f, HasBuildInfo comp) =>
LensLike' f (CondTree v [Dependency] comp) BuildInfo
traverseCondTreeBuildInfo) BuildInfo -> f BuildInfo
f [(UnqualComponentName, CondTree ConfVar [Dependency] Library)]
x2
f ([(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> f ([(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (((UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib))
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (((UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib))
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)])
-> ((BuildInfo -> f BuildInfo)
-> (UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib))
-> (BuildInfo -> f BuildInfo)
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLike
f
(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)
(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)
(CondTree ConfVar [Dependency] ForeignLib)
(CondTree ConfVar [Dependency] ForeignLib)
forall c a b. Lens (c, a) (c, b) a b
L._2 LensLike
f
(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)
(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)
(CondTree ConfVar [Dependency] ForeignLib)
(CondTree ConfVar [Dependency] ForeignLib)
-> ((BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] ForeignLib
-> f (CondTree ConfVar [Dependency] ForeignLib))
-> (BuildInfo -> f BuildInfo)
-> (UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] ForeignLib)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] ForeignLib
-> f (CondTree ConfVar [Dependency] ForeignLib)
forall (f :: * -> *) comp v.
(Applicative f, HasBuildInfo comp) =>
LensLike' f (CondTree v [Dependency] comp) BuildInfo
traverseCondTreeBuildInfo) BuildInfo -> f BuildInfo
f [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)]
x3
f ([(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> f ([(UnqualComponentName,
CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (((UnqualComponentName, CondTree ConfVar [Dependency] Executable)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] Executable))
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (((UnqualComponentName, CondTree ConfVar [Dependency] Executable)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] Executable))
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)])
-> ((BuildInfo -> f BuildInfo)
-> (UnqualComponentName, CondTree ConfVar [Dependency] Executable)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] Executable))
-> (BuildInfo -> f BuildInfo)
-> [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] Executable)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLike
f
(UnqualComponentName, CondTree ConfVar [Dependency] Executable)
(UnqualComponentName, CondTree ConfVar [Dependency] Executable)
(CondTree ConfVar [Dependency] Executable)
(CondTree ConfVar [Dependency] Executable)
forall c a b. Lens (c, a) (c, b) a b
L._2 LensLike
f
(UnqualComponentName, CondTree ConfVar [Dependency] Executable)
(UnqualComponentName, CondTree ConfVar [Dependency] Executable)
(CondTree ConfVar [Dependency] Executable)
(CondTree ConfVar [Dependency] Executable)
-> ((BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Executable
-> f (CondTree ConfVar [Dependency] Executable))
-> (BuildInfo -> f BuildInfo)
-> (UnqualComponentName, CondTree ConfVar [Dependency] Executable)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] Executable)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Executable
-> f (CondTree ConfVar [Dependency] Executable)
forall (f :: * -> *) comp v.
(Applicative f, HasBuildInfo comp) =>
LensLike' f (CondTree v [Dependency] comp) BuildInfo
traverseCondTreeBuildInfo) BuildInfo -> f BuildInfo
f [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)]
x4
f ([(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] TestSuite)]
-> f ([(UnqualComponentName,
CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (((UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] TestSuite))
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] TestSuite)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (((UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] TestSuite))
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] TestSuite)])
-> ((BuildInfo -> f BuildInfo)
-> (UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] TestSuite))
-> (BuildInfo -> f BuildInfo)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] TestSuite)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLike
f
(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
(CondTree ConfVar [Dependency] TestSuite)
(CondTree ConfVar [Dependency] TestSuite)
forall c a b. Lens (c, a) (c, b) a b
L._2 LensLike
f
(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
(CondTree ConfVar [Dependency] TestSuite)
(CondTree ConfVar [Dependency] TestSuite)
-> ((BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] TestSuite
-> f (CondTree ConfVar [Dependency] TestSuite))
-> (BuildInfo -> f BuildInfo)
-> (UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
-> f (UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] TestSuite
-> f (CondTree ConfVar [Dependency] TestSuite)
forall (f :: * -> *) comp v.
(Applicative f, HasBuildInfo comp) =>
LensLike' f (CondTree v [Dependency] comp) BuildInfo
traverseCondTreeBuildInfo) BuildInfo -> f BuildInfo
f [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)]
x5
f ([(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> GenericPackageDescription)
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] Benchmark)]
-> f GenericPackageDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (((UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] Benchmark))
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] Benchmark)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (((UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] Benchmark))
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] Benchmark)])
-> ((BuildInfo -> f BuildInfo)
-> (UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
-> f (UnqualComponentName,
CondTree ConfVar [Dependency] Benchmark))
-> (BuildInfo -> f BuildInfo)
-> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
-> f [(UnqualComponentName,
CondTree ConfVar [Dependency] Benchmark)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLike
f
(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
(CondTree ConfVar [Dependency] Benchmark)
(CondTree ConfVar [Dependency] Benchmark)
forall c a b. Lens (c, a) (c, b) a b
L._2 LensLike
f
(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
(CondTree ConfVar [Dependency] Benchmark)
(CondTree ConfVar [Dependency] Benchmark)
-> ((BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Benchmark
-> f (CondTree ConfVar [Dependency] Benchmark))
-> (BuildInfo -> f BuildInfo)
-> (UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
-> f (UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Benchmark
-> f (CondTree ConfVar [Dependency] Benchmark)
forall (f :: * -> *) comp v.
(Applicative f, HasBuildInfo comp) =>
LensLike' f (CondTree v [Dependency] comp) BuildInfo
traverseCondTreeBuildInfo) BuildInfo -> f BuildInfo
f [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
x6
where
traverseCondTreeBuildInfo
:: forall f comp v. (Applicative f, L.HasBuildInfo comp)
=> LensLike' f (CondTree v [Dependency] comp) L.BuildInfo
traverseCondTreeBuildInfo :: forall (f :: * -> *) comp v.
(Applicative f, HasBuildInfo comp) =>
LensLike' f (CondTree v [Dependency] comp) BuildInfo
traverseCondTreeBuildInfo BuildInfo -> f BuildInfo
g = CondTree v [Dependency] comp -> f (CondTree v [Dependency] comp)
forall {c}. CondTree v c comp -> f (CondTree v [Dependency] comp)
node where
mkCondNode :: comp -> [CondBranch v [Dependency] comp] -> CondTree v [Dependency] comp
mkCondNode :: comp
-> [CondBranch v [Dependency] comp] -> CondTree v [Dependency] comp
mkCondNode comp
comp [CondBranch v [Dependency] comp]
branches = comp
-> [Dependency]
-> [CondBranch v [Dependency] comp]
-> CondTree v [Dependency] comp
forall v c a. a -> c -> [CondBranch v c a] -> CondTree v c a
CondNode comp
comp (Getting [Dependency] comp [Dependency] -> comp -> [Dependency]
forall a s. Getting a s a -> s -> a
view Getting [Dependency] comp [Dependency]
forall a. HasBuildInfo a => Lens' a [Dependency]
L.targetBuildDepends comp
comp) [CondBranch v [Dependency] comp]
branches
node :: CondTree v c comp -> f (CondTree v [Dependency] comp)
node (CondNode comp
comp c
_ [CondBranch v c comp]
branches) = comp
-> [CondBranch v [Dependency] comp] -> CondTree v [Dependency] comp
mkCondNode
(comp
-> [CondBranch v [Dependency] comp]
-> CondTree v [Dependency] comp)
-> f comp
-> f ([CondBranch v [Dependency] comp]
-> CondTree v [Dependency] comp)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> LensLike f comp comp BuildInfo BuildInfo
forall a. HasBuildInfo a => Lens' a BuildInfo
L.buildInfo BuildInfo -> f BuildInfo
g comp
comp
f ([CondBranch v [Dependency] comp]
-> CondTree v [Dependency] comp)
-> f [CondBranch v [Dependency] comp]
-> f (CondTree v [Dependency] comp)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (CondBranch v c comp -> f (CondBranch v [Dependency] comp))
-> [CondBranch v c comp] -> f [CondBranch v [Dependency] comp]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse CondBranch v c comp -> f (CondBranch v [Dependency] comp)
branch [CondBranch v c comp]
branches
branch :: CondBranch v c comp -> f (CondBranch v [Dependency] comp)
branch (CondBranch Condition v
v CondTree v c comp
x Maybe (CondTree v c comp)
y) = Condition v
-> CondTree v [Dependency] comp
-> Maybe (CondTree v [Dependency] comp)
-> CondBranch v [Dependency] comp
forall v c a.
Condition v
-> CondTree v c a -> Maybe (CondTree v c a) -> CondBranch v c a
CondBranch Condition v
v
(CondTree v [Dependency] comp
-> Maybe (CondTree v [Dependency] comp)
-> CondBranch v [Dependency] comp)
-> f (CondTree v [Dependency] comp)
-> f (Maybe (CondTree v [Dependency] comp)
-> CondBranch v [Dependency] comp)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CondTree v c comp -> f (CondTree v [Dependency] comp)
node CondTree v c comp
x
f (Maybe (CondTree v [Dependency] comp)
-> CondBranch v [Dependency] comp)
-> f (Maybe (CondTree v [Dependency] comp))
-> f (CondBranch v [Dependency] comp)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (CondTree v c comp -> f (CondTree v [Dependency] comp))
-> Maybe (CondTree v c comp)
-> f (Maybe (CondTree v [Dependency] comp))
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse CondTree v c comp -> f (CondTree v [Dependency] comp)
node Maybe (CondTree v c comp)
y