diff options
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 |
