From e812acce3e46b7dd259783fc28c2c65d4ad7a228 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Mar 2014 00:52:02 -0400 Subject: improvements --- Property.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Property.hs') 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 -- cgit v1.2.3