module Distribution.Types.ForeignLib.Lens (
    ForeignLib,
    module Distribution.Types.ForeignLib.Lens,
    ) where

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

import Distribution.Types.BuildInfo           (BuildInfo)
import Distribution.Types.ForeignLib          (ForeignLib, LibVersionInfo)
import Distribution.Types.ForeignLibOption    (ForeignLibOption)
import Distribution.Types.ForeignLibType      (ForeignLibType)
import Distribution.Types.UnqualComponentName (UnqualComponentName)
import Distribution.Version                   (Version)

import qualified Distribution.Types.ForeignLib as T

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

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

foreignLibOptions :: Lens' ForeignLib [ForeignLibOption]
foreignLibOptions :: Lens' ForeignLib [ForeignLibOption]
foreignLibOptions [ForeignLibOption] -> f [ForeignLibOption]
f ForeignLib
s = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\[ForeignLibOption]
x -> ForeignLib
s { foreignLibOptions :: [ForeignLibOption]
T.foreignLibOptions = [ForeignLibOption]
x }) ([ForeignLibOption] -> f [ForeignLibOption]
f (ForeignLib -> [ForeignLibOption]
T.foreignLibOptions ForeignLib
s))
{-# INLINE foreignLibOptions #-}

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

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

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

foreignLibModDefFile :: Lens' ForeignLib [FilePath]
foreignLibModDefFile :: Lens' ForeignLib [FilePath]
foreignLibModDefFile [FilePath] -> f [FilePath]
f ForeignLib
s = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\[FilePath]
x -> ForeignLib
s { foreignLibModDefFile :: [FilePath]
T.foreignLibModDefFile = [FilePath]
x }) ([FilePath] -> f [FilePath]
f (ForeignLib -> [FilePath]
T.foreignLibModDefFile ForeignLib
s))
{-# INLINE foreignLibModDefFile #-}