From 7115d1ec162b4059b3e8e8f84bd8d5898c1db025 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 14 May 2014 19:41:05 -0400 Subject: moved source code to src This is to work around OSX's brain-damange regarding filename case insensitivity. Avoided moving config.hs, because it's a config file. Put in a symlink to make build work. --- Propellor/Engine.hs | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 Propellor/Engine.hs (limited to 'Propellor/Engine.hs') diff --git a/Propellor/Engine.hs b/Propellor/Engine.hs deleted file mode 100644 index 55ce7f77..00000000 --- a/Propellor/Engine.hs +++ /dev/null @@ -1,37 +0,0 @@ -{-# LANGUAGE PackageImports #-} - -module Propellor.Engine where - -import System.Exit -import System.IO -import Data.Monoid -import System.Console.ANSI -import "mtl" Control.Monad.Reader - -import Propellor.Types -import Propellor.Message -import Propellor.Exception - -runPropellor :: Attr -> Propellor a -> IO a -runPropellor attr a = runReaderT (runWithAttr a) attr - -mainProperties :: Attr -> [Property] -> IO () -mainProperties attr ps = do - r <- runPropellor attr $ - ensureProperties [Property "overall" (ensureProperties ps) id] - setTitle "propellor: done" - hFlush stdout - case r of - FailedChange -> exitWith (ExitFailure 1) - _ -> exitWith ExitSuccess - -ensureProperties :: [Property] -> Propellor Result -ensureProperties ps = ensure ps NoChange - where - ensure [] rs = return rs - ensure (l:ls) rs = do - r <- actionMessage (propertyDesc l) (ensureProperty l) - ensure ls (r <> rs) - -ensureProperty :: Property -> Propellor Result -ensureProperty = catchPropellor . propertySatisfy -- cgit v1.3-2-g0d8e