diff options
| author | Joey Hess <joey@kitenet.net> | 2014-03-30 00:52:02 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-03-30 00:52:02 -0400 |
| commit | e812acce3e46b7dd259783fc28c2c65d4ad7a228 (patch) | |
| tree | 0e4fb9437427d5b58cfaaee77d3025a6c8c93498 /Property.hs | |
| parent | 08a0a46efe9b96ba741d4cd28451e313726dcba4 (diff) | |
improvements
Diffstat (limited to 'Property.hs')
| -rw-r--r-- | Property.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Property.hs b/Property.hs index 3243d278..c4db8bcf 100644 --- a/Property.hs +++ b/Property.hs @@ -147,6 +147,9 @@ property `onChange` hook = IOProperty (propertyDesc property) $ do return $ combineResult r r' _ -> return r +requires :: Property -> Property -> Property +x `requires` y = combineProperties (propertyDesc x) [y, x] + {- Makes a Property only be performed when a test succeeds. -} check :: IO Bool -> Property -> Property check c property = IOProperty (propertyDesc property) $ ifM c |
