From bdf3e37066a2f01eac7411b77a3b26e3796f5d65 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 23 Oct 2014 11:33:00 -0400 Subject: Revert "propellor spin" This reverts commit 80f5b53f1b7fdc876d5e45df68c29f53bd9666b2. --- src/Propellor/Property.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property.hs') diff --git a/src/Propellor/Property.hs b/src/Propellor/Property.hs index ce825192..4b957317 100644 --- a/src/Propellor/Property.hs +++ b/src/Propellor/Property.hs @@ -135,7 +135,7 @@ host hn = Host hn [] mempty -- -- Can add Properties and RevertableProperties (&) :: IsProp p => Host -> p -> Host -(Host hn ps as) & p = Host hn (ps ++ [toProp p]) (as <> getInfo p) +(Host hn ps is) & p = Host hn (ps ++ [toProp p]) (is <> getInfo p) infixl 1 & @@ -145,6 +145,14 @@ h ! p = h & revert p infixl 1 ! +-- | Like (&), but adds the property as the first property of the host. +-- Normally, property order should not matter, but this is useful +-- when it does. +(&^) :: IsProp p => Host -> p -> Host +(Host hn ps is) &^ p = Host hn ([toProp p] ++ ps) (getInfo p <> is) + +infixl 1 &^ + -- Changes the action that is performed to satisfy a property. adjustProperty :: Property -> (Propellor Result -> Propellor Result) -> Property adjustProperty p f = p { propertySatisfy = f (propertySatisfy p) } -- cgit v1.2.3