From 1dcaeb6f776eaf401b1dbe68f836ec3d5953bb0c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Mar 2014 16:49:59 -0400 Subject: cute describe operator --- Property.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Property.hs') 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 -- cgit v1.3-2-g0d8e