propellor-5.18: property-based host configuration management in haskell

Safe Haskell | Safe-Inferred
Language | Haskell2010

Propellor.Types.Result

Synopsis

- data Result
  - = NoChange
  - | MadeChange
  - | FailedChange
- class ToResult t where
  - toResult :: t -> Result
- class ActionResult a where
  - getActionResult :: a -> (String, ColorIntensity, Color)

# Documentation

data Result Source #

There can be three results of satisfying a Property.

Constructors

NoChange |
MadeChange |
FailedChange |

#### Instances

Instances details

Monoid Result Source # |
Instance details Defined in Propellor.Types.Result Methods mempty :: Result # mappend :: Result -> Result -> Result # mconcat :: [Result] -> Result #
Semigroup Result Source # |
Instance details Defined in Propellor.Types.Result Methods (<>) :: Result -> Result -> Result # sconcat :: NonEmpty Result -> Result stimes :: Integral b => b -> Result -> Result
Read Result Source # |
Instance details Defined in Propellor.Types.Result Methods readsPrec :: Int -> ReadS Result readList :: ReadS [Result] readPrec :: ReadPrec Result readListPrec :: ReadPrec [Result]
Show Result Source # |
Instance details Defined in Propellor.Types.Result Methods showsPrec :: Int -> Result -> ShowS show :: Result -> String showList :: [Result] -> ShowS
Eq Result Source # |
Instance details Defined in Propellor.Types.Result Methods (==) :: Result -> Result -> Bool (/=) :: Result -> Result -> Bool
ActionResult Result Source # |
Instance details Defined in Propellor.Types.Result Methods getActionResult :: Result -> (String, ColorIntensity, Color) Source #
ToResult Result Source # |
Instance details Defined in Propellor.Types.Result Methods toResult :: Result -> Result Source #
Monoid (Propellor Result) Source # |
Instance details Defined in Propellor.Types.Core Methods mempty :: Propellor Result # mappend :: Propellor Result -> Propellor Result -> Propellor Result # mconcat :: [Propellor Result] -> Propellor Result #
Semigroup (Propellor Result) | When two actions are appended together, the second action is only run if the first action does not fail.
Instance details Defined in Propellor.Types.Core Methods (<>) :: Propellor Result -> Propellor Result -> Propellor Result # sconcat :: NonEmpty (Propellor Result) -> Propellor Result stimes :: Integral b => b -> Propellor Result -> Propellor Result

class ToResult t where Source #

Methods

toResult :: t -> Result Source #

#### Instances

Instances details

ToResult Result Source # |
Instance details Defined in Propellor.Types.Result Methods toResult :: Result -> Result Source #
ToResult Bool Source # |
Instance details Defined in Propellor.Types.Result Methods toResult :: Bool -> Result Source #

class ActionResult a where Source #

Results of actions, with color.

Methods

getActionResult :: a -> (String, ColorIntensity, Color) Source #

#### Instances

Instances details

ActionResult Result Source # |
Instance details Defined in Propellor.Types.Result Methods getActionResult :: Result -> (String, ColorIntensity, Color) Source #
ActionResult Bool Source # |
Instance details Defined in Propellor.Types.Result Methods getActionResult :: Bool -> (String, ColorIntensity, Color) Source #