packages feed

executor 0.0.1 → 0.0.2

raw patch · 4 files changed

+15/−17 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for executor +## 0.0.2  -- 2017-08-20++* Make the code a bit cleaner and consistent+ ## 0.0.1  -- 2017-08-19  * First version. Released on an unsuspecting world.
Executor.hs view
@@ -4,29 +4,24 @@ import Control.Concurrent.Async (async, wait)  -- | Execute a single shell command--- | Not much different from callCommand though--- | for example:--- | main = do--- |  execSync "ls"+-- Not much different from callCommand though+-- for example:+-- main = do+--  execSync "ls"  execSync :: String -> IO()  execSync c = do   task <- async (callCommand c)   res <- wait task-  return ()+  return res  -- | Execute a list of shell commands in sequence synchronously--- | for example:--- | main = do--- |  execListSync ["ls", "whoami"]+-- for example:+-- main = do+--  execListSync ["ls", "whoami"]  execListSync :: [String] -> IO() -execListSync (c:commands) = do-  execSync c-  if length commands > 0-    then do-      execListSync commands-    else-      return ()+execListSync commands = do+  mapM_ execSync commands
executor.cabal view
@@ -1,5 +1,5 @@ name:                executor-version:             0.0.1+version:0.0.2 description:         Haskell module to execute single or multiple shell commands synopsis:            Shell helpers homepage:            https://github.com/GianlucaGuarini/executor
test.hs view
@@ -2,7 +2,6 @@ import Executor import System.Exit (exitSuccess) -main :: IO() main = do   execSync "ls"   execListSync [