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

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

import Distribution.Types.BuildInfo (BuildInfo)
import Distribution.Types.TestSuite (TestSuite)
import Distribution.Types.TestSuiteInterface (TestSuiteInterface)
import Distribution.Types.UnqualComponentName (UnqualComponentName)

import qualified Distribution.Types.TestSuite as T

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

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

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