diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-02 20:56:02 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-02 20:56:02 -0400 |
| commit | 5674818300966d4186bf98ef8a075c502271c9cb (patch) | |
| tree | 6263c4f32ac98b7e7f83bc5a4057d55c0dd7cd5b /Propellor/Property.hs | |
| parent | 595794a250a35f3f3613dcf47b955bcdae867e04 (diff) | |
propellor spin
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 |
