fix attr combination

This commit is contained in:
Joey Hess 2014-04-11 00:35:48 -04:00
parent 4c4f702cff
commit 29ae27af3c
1 changed files with 2 additions and 3 deletions

View File

@ -10,7 +10,6 @@ import "mtl" Control.Monad.Reader
import Propellor.Types
import Propellor.Types.Attr
import Propellor.Attr
import Propellor.Engine
import Utility.Monad
@ -108,13 +107,13 @@ host hn = Host [] (\_ -> newAttr hn)
-- | Adds a property to a Host
-- Can add Properties, RevertableProperties, and AttrProperties
(&) :: IsProp p => Host -> p -> Host
(Host ps as) & p = Host (ps ++ [toProp p]) (as . getAttr p)
(Host ps as) & p = Host (ps ++ [toProp p]) (getAttr p . as)
infixl 1 &
-- | Adds a property to the Host in reverted form.
(!) :: Host -> RevertableProperty -> Host
(Host ps as) ! p = Host (ps ++ [toProp q]) (as . getAttr q)
(Host ps as) ! p = Host (ps ++ [toProp q]) (getAttr q . as)
where
q = revert p