diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-01-24 13:59:29 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-01-24 16:53:59 -0400 |
| commit | 414ee7eee60300eb7f7c49e4890b056d19b3c59b (patch) | |
| tree | 93f7ca55067b2c2e00c04110e8605c4d67088fea /src/Propellor/PropAccum.hs | |
| parent | 38eec6fc37054df1838be905670e1ed1ff308a65 (diff) | |
added GADT to determine between a property with info and without
Not yet used
Diffstat (limited to 'src/Propellor/PropAccum.hs')
| -rw-r--r-- | src/Propellor/PropAccum.hs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/Propellor/PropAccum.hs b/src/Propellor/PropAccum.hs index beca8ccc..ddbc1e66 100644 --- a/src/Propellor/PropAccum.hs +++ b/src/Propellor/PropAccum.hs @@ -58,17 +58,18 @@ infixl 1 ! -- PrivData Info is propigated, so that properties used inside a -- PropAccum will have the necessary PrivData available. propigateContainer :: PropAccum container => container -> Property -> Property -propigateContainer c prop = prop - { propertyChildren = propertyChildren prop ++ hostprops - } +propigateContainer c prop = mkProperty + (propertyDesc prop) + (propertySatisfy prop) + (propertyInfo prop) + (propertyChildren prop ++ hostprops) where hostprops = map go $ getProperties c go p = let i = propertyInfo p - in p - { propertyInfo = mempty - { _dns = _dns i - , _privData = _privData i - } - , propertyChildren = map go (propertyChildren p) + i' = mempty + { _dns = _dns i + , _privData = _privData i } + cs = map go (propertyChildren p) + in mkProperty (propertyDesc p) (propertySatisfy p) i' cs |
