Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data UncheckedProperty i
- unchecked :: Property i -> UncheckedProperty i
- checkResult :: (Checkable p i, LiftPropellor m) => m a -> (a -> m Result) -> p i -> Property i
- check :: (Checkable p i, LiftPropellor m) => m Bool -> p i -> Property i
- class Checkable p i
- assume :: Checkable p i => p i -> Result -> Property i
Documentation
data UncheckedProperty i Source #
This is a Property
but its Result
is not accurate; in particular
it may return NoChange
despite having made a change.
However, when it returns MadeChange
, it really did make a change,
and FailedChange
is still an error.
Instances
TightenTargets UncheckedProperty Source # | |
Defined in Propellor.Types.ResultCheck tightenTargets :: (NotSuperset (Targets untightened) (Targets tightened) ~ CanCombine, NotSuperset (NonTargets tightened) (NonTargets untightened) ~ CanCombine, SingI tightened) => UncheckedProperty (MetaTypes untightened) -> UncheckedProperty (MetaTypes tightened) Source # | |
Checkable UncheckedProperty i Source # | |
Defined in Propellor.Types.ResultCheck checkedProp :: UncheckedProperty i -> Property i preCheckedProp :: UncheckedProperty i -> Property i |
unchecked :: Property i -> UncheckedProperty i Source #
Use to indicate that a Property is unchecked.
:: (Checkable p i, LiftPropellor m) | |
=> m a | Run before ensuring the property. |
-> (a -> m Result) | Run after ensuring the property. Return |
-> p i | |
-> Property i |
Checks the result of a property. Mostly used to convert a
UncheckedProperty
to a Property
, but can also be used to further
check a Property
.
check :: (Checkable p i, LiftPropellor m) => m Bool -> p i -> Property i Source #
Makes a Property
or an UncheckedProperty
only run
when a test succeeds.
checkedProp, preCheckedProp
Instances
Checkable Property i Source # | |
Defined in Propellor.Types.ResultCheck checkedProp :: Property i -> Property i preCheckedProp :: Property i -> Property i | |
Checkable UncheckedProperty i Source # | |
Defined in Propellor.Types.ResultCheck checkedProp :: UncheckedProperty i -> Property i preCheckedProp :: UncheckedProperty i -> Property i |