From a2a3d3f3a252e64d80421b5a14ef572a7bdf9e4a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Mar 2014 15:53:35 -0400 Subject: better descriptions for properties --- Property.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Property.hs') diff --git a/Property.hs b/Property.hs index 4055ab2a..84a57a1b 100644 --- a/Property.hs +++ b/Property.hs @@ -83,6 +83,9 @@ property `onChange` hook = Property (propertyDesc property) $ do requires :: Property -> Property -> Property x `requires` y = combineProperties (propertyDesc x) [y, x] +describe :: Property -> Desc -> Property +describe p d = p { propertyDesc = d } + {- Makes a Property only be performed when a test succeeds. -} check :: IO Bool -> Property -> Property check c property = Property (propertyDesc property) $ ifM c -- cgit v1.3-2-g0d8e