From 5df3ad13dfdccf01248368bb8e5fc0dc8d164910 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Apr 2014 23:01:40 -0400 Subject: awesome new revert operator! --- Propellor/Property.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Propellor/Property.hs') diff --git a/Propellor/Property.hs b/Propellor/Property.hs index 29f6bb80..e7ec704d 100644 --- a/Propellor/Property.hs +++ b/Propellor/Property.hs @@ -88,3 +88,8 @@ props = [] (&) :: IsProp p => [Property] -> p -> [Property] ps & p = ps ++ [toProp p] infixl 1 & + +-- | Adds a property to the list in reverted form. +(!) :: [Property] -> RevertableProperty -> [Property] +ps ! p = ps ++ [toProp $ revert p] +infixl 1 ! -- cgit v1.2.3