summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Propellor/Engine.hs15
-rw-r--r--src/Propellor/PropAccum.hs2
2 files changed, 7 insertions, 10 deletions
diff --git a/src/Propellor/Engine.hs b/src/Propellor/Engine.hs
index 62fad5af..bf49b95f 100644
--- a/src/Propellor/Engine.hs
+++ b/src/Propellor/Engine.hs
@@ -1,8 +1,8 @@
{-# LANGUAGE PackageImports #-}
-{-# LANGUAGE GADTs #-}
+{-# LANGUAGE DataKinds #-}
module Propellor.Engine (
- -- mainProperties,
+ mainProperties,
runPropellor,
ensureProperty,
ensureChildProperties,
@@ -29,22 +29,19 @@ import Propellor.Info
import Propellor.Property
import Utility.Exception
-{-
-
-- | Gets the Properties of a Host, and ensures them all,
-- with nice display of what's being done.
mainProperties :: Host -> IO ()
mainProperties host = do
- ret <- runPropellor host $
- ensureProperties [ignoreInfo $ infoProperty "overall" (ensureProperties ps) mempty mempty]
+ ret <- runPropellor host $ ensureChildProperties [toProp overall]
messagesDone
case ret of
FailedChange -> exitWith (ExitFailure 1)
_ -> exitWith ExitSuccess
where
- ps = map ignoreInfo $ hostProperties host
-
--}
+ overall :: Property (MetaTypes '[])
+ overall = property "overall" $
+ ensureChildProperties (hostProperties host)
-- | Runs a Propellor action with the specified host.
--
diff --git a/src/Propellor/PropAccum.hs b/src/Propellor/PropAccum.hs
index 91d7b80d..06b8ad3f 100644
--- a/src/Propellor/PropAccum.hs
+++ b/src/Propellor/PropAccum.hs
@@ -30,7 +30,7 @@ import Propellor.PrivData
-- > ! oldproperty
-- > & otherproperty
host :: HostName -> Props metatypes -> Host
-host hn (Props c) = Host hn c (mconcat (map getInfoRecursive c))
+host hn (Props ps) = Host hn ps (mconcat (map getInfoRecursive ps))
-- | Props is a combination of a list of properties, with their combined
-- metatypes.