propellor-5.13: property-based host configuration management in haskell
Safe HaskellNone




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 details
TightenTargets UncheckedProperty Source # 
Instance details

Defined in Propellor.Types.ResultCheck


tightenTargets :: forall (untightened :: [MetaType]) (tightened :: [MetaType]). (TightenTargetsAllowed untightened tightened, SingI tightened) => UncheckedProperty (MetaTypes untightened) -> UncheckedProperty (MetaTypes tightened) Source #

Checkable UncheckedProperty i Source # 
Instance details

Defined in Propellor.Types.ResultCheck

unchecked :: Property i -> UncheckedProperty i Source #

Use to indicate that a Property is unchecked.

checkResult Source #


:: (Checkable p i, LiftPropellor m) 
=> m a

Run before ensuring the property.

-> (a -> m Result)

Run after ensuring the property. Return MadeChange if a change was detected, or NoChange if no change was detected.

-> 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.

class Checkable p i Source #

Minimal complete definition

checkedProp, preCheckedProp

assume :: Checkable p i => p i -> Result -> Property i Source #

Sometimes it's not practical to test if a property made a change. In such a case, it's often fine to say:

someprop `assume` MadeChange

However, beware assuming NoChange, as that will make combinators like onChange not work.