{-# LANGUAGE DeriveGeneric #-}
module Distribution.Client.Types.BuildResults (
BuildOutcome,
BuildOutcomes,
BuildFailure (..),
BuildResult (..),
TestsResult (..),
DocsResult (..),
) where
import Distribution.Client.Compat.Prelude
import Prelude ()
import Distribution.Types.InstalledPackageInfo (InstalledPackageInfo)
import Distribution.Types.PackageId (PackageId)
import Distribution.Types.UnitId (UnitId)
type BuildOutcome = Either BuildFailure BuildResult
type BuildOutcomes = Map UnitId BuildOutcome
data BuildFailure = PlanningFailed
| DependentFailed PackageId
| DownloadFailed SomeException
| UnpackFailed SomeException
| ConfigureFailed SomeException
| BuildFailed SomeException
| TestsFailed SomeException
| InstallFailed SomeException
deriving (Int -> BuildFailure -> ShowS
[BuildFailure] -> ShowS
BuildFailure -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BuildFailure] -> ShowS
$cshowList :: [BuildFailure] -> ShowS
show :: BuildFailure -> String
$cshow :: BuildFailure -> String
showsPrec :: Int -> BuildFailure -> ShowS
$cshowsPrec :: Int -> BuildFailure -> ShowS
Show, Typeable, forall x. Rep BuildFailure x -> BuildFailure
forall x. BuildFailure -> Rep BuildFailure x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BuildFailure x -> BuildFailure
$cfrom :: forall x. BuildFailure -> Rep BuildFailure x
Generic)
instance Exception BuildFailure
data BuildResult = BuildResult DocsResult TestsResult
(Maybe InstalledPackageInfo)
deriving (Int -> BuildResult -> ShowS
[BuildResult] -> ShowS
BuildResult -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BuildResult] -> ShowS
$cshowList :: [BuildResult] -> ShowS
show :: BuildResult -> String
$cshow :: BuildResult -> String
showsPrec :: Int -> BuildResult -> ShowS
$cshowsPrec :: Int -> BuildResult -> ShowS
Show, forall x. Rep BuildResult x -> BuildResult
forall x. BuildResult -> Rep BuildResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BuildResult x -> BuildResult
$cfrom :: forall x. BuildResult -> Rep BuildResult x
Generic)
data DocsResult = DocsNotTried | DocsFailed | DocsOk
deriving (Int -> DocsResult -> ShowS
[DocsResult] -> ShowS
DocsResult -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocsResult] -> ShowS
$cshowList :: [DocsResult] -> ShowS
show :: DocsResult -> String
$cshow :: DocsResult -> String
showsPrec :: Int -> DocsResult -> ShowS
$cshowsPrec :: Int -> DocsResult -> ShowS
Show, forall x. Rep DocsResult x -> DocsResult
forall x. DocsResult -> Rep DocsResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DocsResult x -> DocsResult
$cfrom :: forall x. DocsResult -> Rep DocsResult x
Generic, Typeable)
data TestsResult = TestsNotTried | TestsOk
deriving (Int -> TestsResult -> ShowS
[TestsResult] -> ShowS
TestsResult -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestsResult] -> ShowS
$cshowList :: [TestsResult] -> ShowS
show :: TestsResult -> String
$cshow :: TestsResult -> String
showsPrec :: Int -> TestsResult -> ShowS
$cshowsPrec :: Int -> TestsResult -> ShowS
Show, forall x. Rep TestsResult x -> TestsResult
forall x. TestsResult -> Rep TestsResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TestsResult x -> TestsResult
$cfrom :: forall x. TestsResult -> Rep TestsResult x
Generic, Typeable)
instance Binary BuildFailure
instance Binary BuildResult
instance Binary DocsResult
instance Binary TestsResult
instance Structured BuildFailure
instance Structured BuildResult
instance Structured DocsResult
instance Structured TestsResult