packages feed

process-sequential 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+17/−4 lines, 3 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 process-sequential -## 0.1.0.0 -- YYYY-mm-dd+## 0.1.0.0 -- 2021-03-05  * First version. Released on an unsuspecting world.++## 0.1.1.0 -- 2021-03-09++* First version revised A. Added some exceptions handling using Control.Exception.catch. Some minor documentation improvements.
System/Process/Sequential.hs view
@@ -16,6 +16,7 @@  module System.Process.Sequential where +import Control.Exception import Data.List (isPrefixOf) import Data.Maybe (mapMaybe, fromJust) import Data.Monoid (mappend)@@ -24,6 +25,8 @@ import System.Exit (ExitCode(..)) import EndOfExe (showE) import Sublists (intoRegularSublists)+import System.IO (hPutStrLn, stderr)+import System.Exit (ExitCode(ExitFailure))  seqFlsReadProcessWithExitCode   :: FilePath -- ^ A name of the executable that must be available inside the variable PATH.@@ -54,7 +57,10 @@       yss = filter (not . null) . intoRegularSublists ns $ zss       ends1 = map (f . last) yss       y1ss = zipWith (\xss rs -> xss ++ [rs]) yss ends1-  mapM_ (\uss -> seqFlsHelp1 executable uss xss ys) y1ss+  mapM_ (\uss -> catch (seqFlsHelp1 executable uss xss ys) (\e -> do -- this for the catch is taken from the Control.Exception module from the @base@ package.+     let err = show (e :: IOException)+     hPutStrLn stderr ("Warning: executable exception: " ++ err)+     return (ExitFailure 0))) y1ss   return ends1  seqFlsReadProcessWithExitCode0@@ -69,7 +75,10 @@   let yss = filter (not . null) . intoRegularSublists ns $ zss       ends1 = map (f . last) yss       y1ss = zipWith (\xss rs -> xss ++ [rs]) yss ends1-  mapM_ (\uss -> seqFlsHelp1 executable uss xss ys) y1ss+  mapM_ (\uss -> catch (seqFlsHelp1 executable uss xss ys) (\e -> do -- this for the catch is taken from the Control.Exception module from the @base@ package.+     let err = show (e :: IOException)+     hPutStrLn stderr ("Warning: executable exception: " ++ err)+     return (ExitFailure 0))) y1ss   return (ends1, ns, xss)  recursiveApplyFGH
process-sequential.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                process-sequential-version:             0.1.0.0+version:             0.1.1.0 synopsis:            A test suite for the complex multi files multi level processment. description:         This library is intended to be a testsuite for some recursive multi file multiprocessment using some system executable that processes multiple files creating the resulting one (the \"sox\" can be a good example). The purposes are to avoid leakage of resources if the number of files are too great to be processed at once, to use multiple sequential processment schemes for the same executable and to create to some extent complex processment environment. Nevertheless, there is no guarantees that the test will be successful and such an environment can be created using such a scheme. Please, do not use at the moment in the production without additional thorough testing. homepage:            https://hackage.haskell.org/package/process-sequential