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

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

import Distribution.Types.Benchmark (Benchmark)
import Distribution.Types.BenchmarkInterface (BenchmarkInterface)
import Distribution.Types.BuildInfo (BuildInfo)
import Distribution.Types.UnqualComponentName (UnqualComponentName)

import qualified Distribution.Types.Benchmark as T

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

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

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