diff options
| author | Joey Hess <joey@kitenet.net> | 2014-03-30 16:49:59 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-03-30 16:49:59 -0400 |
| commit | 1dcaeb6f776eaf401b1dbe68f836ec3d5953bb0c (patch) | |
| tree | 37f813dc629f53aee392b6d0bae19c218ade3026 /Property.hs | |
| parent | 3af4cc011ec0ae98bf5e9ebc274188d416db5f18 (diff) | |
cute describe operator
Diffstat (limited to 'Property.hs')
| -rw-r--r-- | Property.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Property.hs b/Property.hs index 77a1f502..95a225c9 100644 --- a/Property.hs +++ b/Property.hs @@ -89,6 +89,10 @@ x `requires` y = combineProperties [y, x] `describe` propertyDesc x describe :: Property -> Desc -> Property describe p d = p { propertyDesc = d } +(==>) :: Desc -> Property -> Property +(==>) = flip describe +infixl 1 ==> + {- Makes a Property only be performed when a test succeeds. -} check :: IO Bool -> Property -> Property check c property = Property (propertyDesc property) $ ifM c |
