diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-23 17:38:48 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-23 17:38:48 -0400 |
| commit | 70797918ff2dd1d0588e4a3d2eb2a38381ecd9ed (patch) | |
| tree | b755fba501fcbe013d7c9294fc7ce4b21a2d057a /src/Propellor/Property.hs | |
| parent | 42ed4b5e68ec84106850c07904ee6124a7805742 (diff) | |
| parent | 0d08ba360b576fe000a9ce67ce2082267aad9d5c (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property.hs')
| -rw-r--r-- | src/Propellor/Property.hs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Propellor/Property.hs b/src/Propellor/Property.hs index 342db1a5..95805054 100644 --- a/src/Propellor/Property.hs +++ b/src/Propellor/Property.hs @@ -142,11 +142,12 @@ ensureProperty :: Property NoInfo -> Propellor Result ensureProperty = catchPropellor . propertySatisfy -- | Makes a Property only need to do anything when a test succeeds. -check :: IO Bool -> Property i -> Property i -check c p = adjustPropertySatisfy p $ \satisfy -> ifM (liftIO c) - ( satisfy - , return NoChange - ) +check :: (LiftPropellor m) => m Bool -> Property i -> Property i +check c p = adjustPropertySatisfy p $ \satisfy -> + ifM (liftPropellor c) + ( satisfy + , return NoChange + ) -- | Tries the first property, but if it fails to work, instead uses -- the second. |
