summaryrefslogtreecommitdiff
path: root/Property.hs
diff options
context:
space:
mode:
authorJoey Hess2014-03-30 15:53:35 -0400
committerJoey Hess2014-03-30 15:53:35 -0400
commita2a3d3f3a252e64d80421b5a14ef572a7bdf9e4a (patch)
tree98ba2b94f011824e591bee66b3f113c52061f48a /Property.hs
parent90efcd3203d64c2c5691e30ccc23307aae8d20c8 (diff)
better descriptions for properties
Diffstat (limited to 'Property.hs')
-rw-r--r--Property.hs3
1 files changed, 3 insertions, 0 deletions
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