diff options
Diffstat (limited to 'Propellor/Property.hs')
| -rw-r--r-- | Propellor/Property.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Propellor/Property.hs b/Propellor/Property.hs index 7419f352..29f6bb80 100644 --- a/Propellor/Property.hs +++ b/Propellor/Property.hs @@ -69,6 +69,12 @@ check c property = Property (propertyDesc property) $ ifM c , return NoChange ) +boolProperty :: Desc -> IO Bool -> Property +boolProperty desc a = Property desc $ ifM a + ( return MadeChange + , return FailedChange + ) + -- | Undoes the effect of a property. revert :: RevertableProperty -> RevertableProperty revert (RevertableProperty p1 p2) = RevertableProperty p2 p1 |
