From 16ea40620ef2dbd62a2e8d5d8eb153e03d0c5848 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 24 Mar 2016 20:20:26 -0400 Subject: ported most of PropAccum --- src/Propellor/PropAccum.hs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/Propellor/PropAccum.hs') diff --git a/src/Propellor/PropAccum.hs b/src/Propellor/PropAccum.hs index 85a30af5..7c838c92 100644 --- a/src/Propellor/PropAccum.hs +++ b/src/Propellor/PropAccum.hs @@ -6,7 +6,7 @@ module Propellor.PropAccum , (&) , (&^) , (!) - , propagateContainer + --, propagateContainer ) where import Data.Monoid @@ -33,7 +33,7 @@ class PropAccum h where -- | Like addProp, but adds the property at the front of the list. addPropFront :: IsProp p => h -> p -> h - getProperties :: h -> [Property HasInfo] + getProperties :: h -> [ChildProperty] -- | Adds a property to a `Host` or other `PropAccum` -- @@ -46,7 +46,7 @@ class PropAccum h where (&^) = addPropFront -- | Adds a property in reverted form. -(!) :: IsProp (RevertableProperty i) => PropAccum h => h -> RevertableProperty i -> h +(!) :: IsProp (RevertableProperty undometatypes setupmetatypes) => PropAccum h => h -> RevertableProperty setupmetatypes undometatypes -> h h ! p = h & revert p infixl 1 & @@ -60,6 +60,8 @@ instance PropAccum Host where (getInfoRecursive p <> is) getProperties = hostProperties +{- + -- | Adjust the provided Property, adding to its -- propertyChidren the properties of the provided container. -- @@ -72,9 +74,10 @@ propagateContainer :: (PropAccum container) => String -> container - -> Property HasInfo - -> Property HasInfo -propagateContainer containername c prop = infoProperty + -> Property metatypes + -> Property metatypes +propagateContainer containername c prop = Property + undefined (propertyDesc prop) (propertySatisfy prop) (propertyInfo prop) @@ -86,3 +89,5 @@ propagateContainer containername c prop = infoProperty (propagatableInfo (propertyInfo p)) cs = map go (propertyChildren p) in infoProperty (propertyDesc p) (propertySatisfy p) i cs + +-} -- cgit v1.3-2-g0d8e