From 414ee7eee60300eb7f7c49e4890b056d19b3c59b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Jan 2015 13:59:29 -0400 Subject: added GADT to determine between a property with info and without Not yet used --- src/Propellor/Engine.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Engine.hs') diff --git a/src/Propellor/Engine.hs b/src/Propellor/Engine.hs index 0835660f..ddc22305 100644 --- a/src/Propellor/Engine.hs +++ b/src/Propellor/Engine.hs @@ -1,4 +1,5 @@ {-# LANGUAGE PackageImports #-} +{-# LANGUAGE GADTs #-} module Propellor.Engine ( mainProperties, @@ -35,7 +36,7 @@ import Utility.Monad mainProperties :: Host -> IO () mainProperties host = do ret <- runPropellor host $ - ensureProperties [Property "overall" (ensureProperties $ hostProperties host) mempty mempty] + ensureProperties [mkProperty "overall" (ensureProperties ps) mempty mempty] h <- mkMessageHandle whenConsole h $ setTitle "propellor: done" @@ -43,6 +44,8 @@ mainProperties host = do case ret of FailedChange -> exitWith (ExitFailure 1) _ -> exitWith ExitSuccess + where + ps = hostProperties host -- | Runs a Propellor action with the specified host. -- -- cgit v1.3-2-g0d8e