From 5674818300966d4186bf98ef8a075c502271c9cb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Apr 2014 20:56:02 -0400 Subject: propellor spin --- Propellor/Property.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Propellor/Property.hs') 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 -- cgit v1.2.3