{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE OverloadedRecordDot #-}
module Stack.Types.BuildOpts
( BuildOpts (..)
, HaddockOpts (..)
, TestOpts (..)
, BenchmarkOpts (..)
, buildOptsHaddockL
, buildOptsInstallExesL
) where
import Stack.Prelude
import Stack.Types.BuildOptsMonoid
( CabalVerbosity (..), ProgressBarFormat (..) )
data BuildOpts = BuildOpts
{ BuildOpts -> Bool
libProfile :: !Bool
, BuildOpts -> Bool
exeProfile :: !Bool
, BuildOpts -> Bool
libStrip :: !Bool
, BuildOpts -> Bool
exeStrip :: !Bool
, BuildOpts -> Bool
buildHaddocks :: !Bool
, BuildOpts -> HaddockOpts
haddockOpts :: !HaddockOpts
, BuildOpts -> Bool
openHaddocks :: !Bool
, BuildOpts -> Maybe Bool
haddockDeps :: !(Maybe Bool)
, BuildOpts -> Bool
haddockInternal :: !Bool
, BuildOpts -> Bool
haddockHyperlinkSource :: !Bool
, BuildOpts -> Bool
haddockForHackage :: !Bool
, BuildOpts -> Bool
installExes :: !Bool
, BuildOpts -> Bool
installCompilerTool :: !Bool
, BuildOpts -> Bool
preFetch :: !Bool
, BuildOpts -> Maybe Bool
keepGoing :: !(Maybe Bool)
, BuildOpts -> Bool
keepTmpFiles :: !Bool
, BuildOpts -> Bool
forceDirty :: !Bool
, BuildOpts -> Bool
tests :: !Bool
, BuildOpts -> TestOpts
testOpts :: !TestOpts
, BuildOpts -> Bool
benchmarks :: !Bool
, BuildOpts -> BenchmarkOpts
benchmarkOpts :: !BenchmarkOpts
, BuildOpts -> Bool
reconfigure :: !Bool
, BuildOpts -> CabalVerbosity
cabalVerbose :: !CabalVerbosity
, BuildOpts -> Bool
splitObjs :: !Bool
, BuildOpts -> [Text]
skipComponents :: ![Text]
, BuildOpts -> Bool
interleavedOutput :: !Bool
, BuildOpts -> ProgressBarFormat
progressBar :: !ProgressBarFormat
, BuildOpts -> Maybe Text
ddumpDir :: !(Maybe Text)
}
deriving Int -> BuildOpts -> ShowS
[BuildOpts] -> ShowS
BuildOpts -> String
(Int -> BuildOpts -> ShowS)
-> (BuildOpts -> String)
-> ([BuildOpts] -> ShowS)
-> Show BuildOpts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BuildOpts -> ShowS
showsPrec :: Int -> BuildOpts -> ShowS
$cshow :: BuildOpts -> String
show :: BuildOpts -> String
$cshowList :: [BuildOpts] -> ShowS
showList :: [BuildOpts] -> ShowS
Show
newtype HaddockOpts = HaddockOpts
{ HaddockOpts -> [String]
additionalArgs :: [String]
}
deriving (HaddockOpts -> HaddockOpts -> Bool
(HaddockOpts -> HaddockOpts -> Bool)
-> (HaddockOpts -> HaddockOpts -> Bool) -> Eq HaddockOpts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HaddockOpts -> HaddockOpts -> Bool
== :: HaddockOpts -> HaddockOpts -> Bool
$c/= :: HaddockOpts -> HaddockOpts -> Bool
/= :: HaddockOpts -> HaddockOpts -> Bool
Eq, Int -> HaddockOpts -> ShowS
[HaddockOpts] -> ShowS
HaddockOpts -> String
(Int -> HaddockOpts -> ShowS)
-> (HaddockOpts -> String)
-> ([HaddockOpts] -> ShowS)
-> Show HaddockOpts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HaddockOpts -> ShowS
showsPrec :: Int -> HaddockOpts -> ShowS
$cshow :: HaddockOpts -> String
show :: HaddockOpts -> String
$cshowList :: [HaddockOpts] -> ShowS
showList :: [HaddockOpts] -> ShowS
Show)
data TestOpts = TestOpts
{ TestOpts -> Bool
rerunTests :: !Bool
, TestOpts -> [String]
additionalArgs :: ![String]
, TestOpts -> Bool
coverage :: !Bool
, TestOpts -> Bool
disableRun :: !Bool
, TestOpts -> Maybe Int
maximumTimeSeconds :: !(Maybe Int)
, TestOpts -> Bool
allowStdin :: !Bool
}
deriving (TestOpts -> TestOpts -> Bool
(TestOpts -> TestOpts -> Bool)
-> (TestOpts -> TestOpts -> Bool) -> Eq TestOpts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TestOpts -> TestOpts -> Bool
== :: TestOpts -> TestOpts -> Bool
$c/= :: TestOpts -> TestOpts -> Bool
/= :: TestOpts -> TestOpts -> Bool
Eq, Int -> TestOpts -> ShowS
[TestOpts] -> ShowS
TestOpts -> String
(Int -> TestOpts -> ShowS)
-> (TestOpts -> String) -> ([TestOpts] -> ShowS) -> Show TestOpts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TestOpts -> ShowS
showsPrec :: Int -> TestOpts -> ShowS
$cshow :: TestOpts -> String
show :: TestOpts -> String
$cshowList :: [TestOpts] -> ShowS
showList :: [TestOpts] -> ShowS
Show)
data BenchmarkOpts = BenchmarkOpts
{ BenchmarkOpts -> Maybe String
additionalArgs :: !(Maybe String)
, BenchmarkOpts -> Bool
disableRun :: !Bool
}
deriving (BenchmarkOpts -> BenchmarkOpts -> Bool
(BenchmarkOpts -> BenchmarkOpts -> Bool)
-> (BenchmarkOpts -> BenchmarkOpts -> Bool) -> Eq BenchmarkOpts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BenchmarkOpts -> BenchmarkOpts -> Bool
== :: BenchmarkOpts -> BenchmarkOpts -> Bool
$c/= :: BenchmarkOpts -> BenchmarkOpts -> Bool
/= :: BenchmarkOpts -> BenchmarkOpts -> Bool
Eq, Int -> BenchmarkOpts -> ShowS
[BenchmarkOpts] -> ShowS
BenchmarkOpts -> String
(Int -> BenchmarkOpts -> ShowS)
-> (BenchmarkOpts -> String)
-> ([BenchmarkOpts] -> ShowS)
-> Show BenchmarkOpts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BenchmarkOpts -> ShowS
showsPrec :: Int -> BenchmarkOpts -> ShowS
$cshow :: BenchmarkOpts -> String
show :: BenchmarkOpts -> String
$cshowList :: [BenchmarkOpts] -> ShowS
showList :: [BenchmarkOpts] -> ShowS
Show)
buildOptsInstallExesL :: Lens' BuildOpts Bool
buildOptsInstallExesL :: Lens' BuildOpts Bool
buildOptsInstallExesL =
(BuildOpts -> Bool)
-> (BuildOpts -> Bool -> BuildOpts) -> Lens' BuildOpts Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
lens (.installExes) (\BuildOpts
bopts Bool
t -> BuildOpts
bopts {installExes = t})
buildOptsHaddockL :: Lens' BuildOpts Bool
buildOptsHaddockL :: Lens' BuildOpts Bool
buildOptsHaddockL =
(BuildOpts -> Bool)
-> (BuildOpts -> Bool -> BuildOpts) -> Lens' BuildOpts Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
lens (.buildHaddocks) (\BuildOpts
bopts Bool
t -> BuildOpts
bopts {buildHaddocks = t})