{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}

module Distribution.Types.GenericPackageDescription (
    GenericPackageDescription(..),
    emptyGenericPackageDescription,
) where

import Prelude ()
import Distribution.Compat.Prelude

-- lens
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

-- ---------------------------------------------------------------------------
-- The 'GenericPackageDescription' type

data GenericPackageDescription =
  GenericPackageDescription
  { GenericPackageDescription -> PackageDescription
packageDescription :: PackageDescription
  , GenericPackageDescription -> [Flag]
genPackageFlags    :: [Flag]
  , 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
DataType
Constr
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 d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> GenericPackageDescription
-> c GenericPackageDescription
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c 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)
$cGenericPackageDescription :: Constr
$tGenericPackageDescription :: DataType
gmapMo :: (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 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 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 :: Int
-> (forall d. Data d => d -> u) -> GenericPackageDescription -> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> GenericPackageDescription -> u
gmapQ :: (forall d. Data d => d -> u) -> GenericPackageDescription -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> GenericPackageDescription -> [u]
gmapQr :: (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 :: (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 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 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 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 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
$cp1Data :: Typeable 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
-> [Flag]
-> 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 (CondTree ConfVar [Dependency] Library)
forall a. Maybe a
Nothing [] [] [] [] []

-- -----------------------------------------------------------------------------
-- Traversal Instances

instance L.HasBuildInfos GenericPackageDescription where
  traverseBuildInfos :: LensLike
  f
  GenericPackageDescription
  GenericPackageDescription
  BuildInfo
  BuildInfo
traverseBuildInfos BuildInfo -> f BuildInfo
f (GenericPackageDescription PackageDescription
p [Flag]
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
-> [Flag]
-> 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
 -> [Flag]
 -> 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 ([Flag]
      -> 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 ([Flag]
   -> 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 [Flag]
-> 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
<*> [Flag] -> f [Flag]
forall (f :: * -> *) a. Applicative f => a -> f a
pure [Flag]
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
. (Library -> f Library)
-> CondTree ConfVar [Dependency] Library
-> f (CondTree ConfVar [Dependency] Library)
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((Library -> f Library)
 -> CondTree ConfVar [Dependency] Library
 -> f (CondTree ConfVar [Dependency] Library))
-> ((BuildInfo -> f BuildInfo) -> Library -> f Library)
-> (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Library
-> f (CondTree ConfVar [Dependency] Library)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo) -> Library -> f Library
forall a. HasBuildInfo a => Lens' a BuildInfo
L.buildInfo) 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
. (Library -> f Library)
-> CondTree ConfVar [Dependency] Library
-> f (CondTree ConfVar [Dependency] Library)
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((Library -> f Library)
 -> CondTree ConfVar [Dependency] Library
 -> f (CondTree ConfVar [Dependency] Library))
-> ((BuildInfo -> f BuildInfo) -> Library -> f Library)
-> (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Library
-> f (CondTree ConfVar [Dependency] Library)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo) -> Library -> f Library
forall a. HasBuildInfo a => Lens' a BuildInfo
L.buildInfo) 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
. (ForeignLib -> f ForeignLib)
-> CondTree ConfVar [Dependency] ForeignLib
-> f (CondTree ConfVar [Dependency] ForeignLib)
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((ForeignLib -> f ForeignLib)
 -> CondTree ConfVar [Dependency] ForeignLib
 -> f (CondTree ConfVar [Dependency] ForeignLib))
-> ((BuildInfo -> f BuildInfo) -> ForeignLib -> f ForeignLib)
-> (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] ForeignLib
-> f (CondTree ConfVar [Dependency] ForeignLib)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo) -> ForeignLib -> f ForeignLib
forall a. HasBuildInfo a => Lens' a BuildInfo
L.buildInfo) 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
. (Executable -> f Executable)
-> CondTree ConfVar [Dependency] Executable
-> f (CondTree ConfVar [Dependency] Executable)
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((Executable -> f Executable)
 -> CondTree ConfVar [Dependency] Executable
 -> f (CondTree ConfVar [Dependency] Executable))
-> ((BuildInfo -> f BuildInfo) -> Executable -> f Executable)
-> (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Executable
-> f (CondTree ConfVar [Dependency] Executable)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo) -> Executable -> f Executable
forall a. HasBuildInfo a => Lens' a BuildInfo
L.buildInfo) 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
. (TestSuite -> f TestSuite)
-> CondTree ConfVar [Dependency] TestSuite
-> f (CondTree ConfVar [Dependency] TestSuite)
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((TestSuite -> f TestSuite)
 -> CondTree ConfVar [Dependency] TestSuite
 -> f (CondTree ConfVar [Dependency] TestSuite))
-> ((BuildInfo -> f BuildInfo) -> TestSuite -> f TestSuite)
-> (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] TestSuite
-> f (CondTree ConfVar [Dependency] TestSuite)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo) -> TestSuite -> f TestSuite
forall a. HasBuildInfo a => Lens' a BuildInfo
L.buildInfo) 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
. (Benchmark -> f Benchmark)
-> CondTree ConfVar [Dependency] Benchmark
-> f (CondTree ConfVar [Dependency] Benchmark)
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((Benchmark -> f Benchmark)
 -> CondTree ConfVar [Dependency] Benchmark
 -> f (CondTree ConfVar [Dependency] Benchmark))
-> ((BuildInfo -> f BuildInfo) -> Benchmark -> f Benchmark)
-> (BuildInfo -> f BuildInfo)
-> CondTree ConfVar [Dependency] Benchmark
-> f (CondTree ConfVar [Dependency] Benchmark)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (BuildInfo -> f BuildInfo) -> Benchmark -> f Benchmark
forall a. HasBuildInfo a => Lens' a BuildInfo
L.buildInfo) BuildInfo -> f BuildInfo
f [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)]
x6