wolf 0.3.3 → 0.3.4
raw patch · 8 files changed
+22/−38 lines, 8 files
Files
- Shakefile.hs +1/−2
- main/actor.hs +1/−1
- main/decider.hs +1/−1
- src/Network/AWS/Wolf/Act.hs +6/−5
- src/Network/AWS/Wolf/Decide.hs +8/−7
- src/Network/AWS/Wolf/File.hs +3/−3
- src/Network/AWS/Wolf/Prelude.hs +1/−18
- wolf.cabal +1/−1
Shakefile.hs view
@@ -20,7 +20,6 @@ , "Shakefile.hs" , "main//*.hs" , "src//*.hs"- , "test//*.hs" ] -- | Cabal rules.@@ -34,7 +33,7 @@ -- | sanity -- fake' pats "sanity" $ const $- need [ "lint", fakeFile "build-error" ]+ need [ fakeFile "build-error", "lint" ] -- | Default things to run. --
main/actor.hs view
@@ -27,7 +27,7 @@ main :: IO () main = do args <- getRecord "Actor"- runResourceT $ actMain+ actMain (config args) (queue args) (command args)
main/decider.hs view
@@ -25,6 +25,6 @@ main :: IO () main = do args <- getRecord "Decider"- runResourceT $ decideMain+ decideMain (config args) (plan args)
src/Network/AWS/Wolf/Act.hs view
@@ -84,9 +84,10 @@ -- | Run actor from main with config file. ---actMain :: MonadMain m => FilePath -> Text -> String -> m ()+actMain :: MonadControl m => FilePath -> Text -> String -> m () actMain cf queue command =- runCtx $ do- conf <- readYaml cf- runConfCtx conf $- forever $ act queue command+ runResourceT $+ runCtx $ do+ conf <- readYaml cf+ runConfCtx conf $+ forever $ act queue command
src/Network/AWS/Wolf/Decide.hs view
@@ -101,11 +101,12 @@ -- | Run decider from main with config file. ---decideMain :: MonadMain m => FilePath -> FilePath -> m ()+decideMain :: MonadControl m => FilePath -> FilePath -> m () decideMain cf pf =- runCtx $ do- conf <- readYaml cf- runConfCtx conf $ do- plans <- readYaml pf- runConcurrent $- (forever . decide) <$> plans+ runResourceT $+ runCtx $ do+ conf <- readYaml cf+ runConfCtx conf $ do+ plans <- readYaml pf+ runConcurrent $+ (forever . decide) <$> plans
src/Network/AWS/Wolf/File.hs view
@@ -120,13 +120,13 @@ -- | Setup a temporary work directory. ---withWorkDirectory :: MonadBaseControlIO m => Text -> (FilePath -> m a) -> m a+withWorkDirectory :: MonadControl m => Text -> (FilePath -> m a) -> m a withWorkDirectory uid = bracket (getWorkDirectory uid) (liftIO . removeDirectoryRecursive) -- | Change to directory and then return to current directory. ---withCurrentDirectory :: MonadBaseControlIO m => FilePath -> (FilePath -> m a) -> m a+withCurrentDirectory :: MonadControl m => FilePath -> (FilePath -> m a) -> m a withCurrentDirectory wd action = bracket (liftIO getCurrentDirectory) (liftIO . setCurrentDirectory) $ \cd -> do liftIO $ setCurrentDirectory wd@@ -134,7 +134,7 @@ -- | Setup a temporary work directory and copy current directory files to it. ---withCurrentWorkDirectory :: MonadBaseControlIO m => Text -> (FilePath -> m a) -> m a+withCurrentWorkDirectory :: MonadControl m => Text -> (FilePath -> m a) -> m a withCurrentWorkDirectory uid action = withWorkDirectory uid $ \wd -> withCurrentDirectory wd $ \cd -> do
src/Network/AWS/Wolf/Prelude.hs view
@@ -6,17 +6,12 @@ -- module Network.AWS.Wolf.Prelude ( module Exports- , runResourceT , runConcurrent , stripPrefix'- , MonadBaseControlIO- , MonadMain ) where import Control.Concurrent.Async.Lifted-import Control.Monad.Catch import Control.Monad.Trans.Control-import Control.Monad.Trans.Resource import Data.Text hiding (map) import Preamble as Exports hiding (stripPrefix) @@ -28,16 +23,4 @@ -- | Strip the prefix with a '/' tacked on to the prefix. -- stripPrefix' :: Text -> Text -> Maybe Text-stripPrefix' prefix =- stripPrefix (prefix -/- mempty)--type MonadBaseControlIO m =- ( MonadBaseControl IO m- , MonadIO m- )--type MonadMain m =- ( MonadBaseControlIO m- , MonadResource m- , MonadCatch m- )+stripPrefix' prefix = stripPrefix (prefix -/- mempty)
wolf.cabal view
@@ -1,5 +1,5 @@ name: wolf-version: 0.3.3+version: 0.3.4 synopsis: Amazon Simple Workflow Service Wrapper. description: Wolf is a wrapper around Amazon Simple Workflow Service. homepage: https://github.com/swift-nav/wolf