packages feed

Workflow 0.8.0.9 → 0.8.1

raw patch · 4 files changed

+17/−12 lines, 4 filesdep ~RefSerializedep ~TCachedep ~exceptionsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: RefSerialize, TCache, exceptions

API changes (from Hackage documentation)

- Control.Workflow: exec1nc :: (Monad m, MonadIO m, MonadCatch m) => String -> Workflow m a -> m a
+ Control.Workflow: exec1nc :: (Monad m, MonadIO m, MonadMask m) => String -> Workflow m a -> m a
- Control.Workflow.Configuration: runConfiguration :: (Monad m, MonadIO m, MonadCatch m) => String -> Workflow m a -> m a
+ Control.Workflow.Configuration: runConfiguration :: (Monad m, MonadIO m, MonadMask m) => String -> Workflow m a -> m a
- Control.Workflow.Patterns: select :: (Serialize a, Typeable a, HasFork io, MonadCatch io) => Integer -> (a -> STM Select) -> [ActionWF a] -> Workflow io [a]
+ Control.Workflow.Patterns: select :: (Serialize a, Typeable a, HasFork io, MonadMask io) => Integer -> (a -> STM Select) -> [ActionWF a] -> Workflow io [a]
- Control.Workflow.Patterns: split :: (Typeable b, Serialize b, HasFork io, MonadCatch io) => [a -> Workflow io b] -> a -> Workflow io [ActionWF b]
+ Control.Workflow.Patterns: split :: (Typeable b, Serialize b, HasFork io, MonadMask io) => [a -> Workflow io b] -> a -> Workflow io [ActionWF b]
- Control.Workflow.Patterns: sumUp :: (Serialize b, Typeable b, Monoid b, HasFork io, MonadCatch io) => Integer -> [a -> Workflow io b] -> a -> Workflow io b
+ Control.Workflow.Patterns: sumUp :: (Serialize b, Typeable b, Monoid b, HasFork io, MonadMask io) => Integer -> [a -> Workflow io b] -> a -> Workflow io b
- Control.Workflow.Patterns: vote :: (Serialize b, Typeable b, HasFork io, MonadCatch io) => Integer -> [a -> Workflow io b] -> ([b] -> Workflow io c) -> a -> Workflow io c
+ Control.Workflow.Patterns: vote :: (Serialize b, Typeable b, HasFork io, MonadMask io) => Integer -> [a -> Workflow io b] -> ([b] -> Workflow io c) -> a -> Workflow io c

Files

Control/Workflow.hs view
@@ -9,6 +9,7 @@             , DeriveDataTypeable
             , RecordWildCards
             , BangPatterns
+            , CPP
           #-}
 {-# OPTIONS -IControl/Workflow       #-}
 
@@ -158,7 +159,11 @@ import System.IO.Unsafe
 import Control.Monad(when,liftM)
 import Control.Applicative
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 707
 import qualified Control.Exception as CE (Exception,AsyncException(ThreadKilled), SomeException, ErrorCall, throwIO, handle,finally,catch)
+#else
+import qualified Control.Exception as CE (Exception,AsyncException(ThreadKilled), SomeException, ErrorCall, throwIO, handle,finally,catch,block,unblock)
+#endif
 import Control.Concurrent -- (forkIO,threadDelay, ThreadId, myThreadId, killThread)
 import Control.Concurrent.STM
 import GHC.Conc(unsafeIOToSTM)
@@ -416,7 +421,7 @@ -- It this case, the workflow just will return the last result.
 -- If the workflow was gathering data from user questions for a configuration, then this
 -- primitive will store them in the log the first time, and can be retrieve it the next time.
-exec1nc ::  (  Monad m, MonadIO m, CMC.MonadCatch m)
+exec1nc ::  (  Monad m, MonadIO m, CMC.MonadMask m)
           => String ->  Workflow m a ->   m  a
 exec1nc str f  =do
     v <- getState str f ()
Control/Workflow/Configuration.hs view
@@ -29,7 +29,7 @@  -- | executes a computation with `once` and `ever` statements -- a synonym of `exec1nc`-runConfiguration :: (  Monad m, MonadIO m, CMC.MonadCatch m)+runConfiguration :: (  Monad m, MonadIO m, CMC.MonadMask m)                  => String ->  Workflow m a ->   m  a runConfiguration  = exec1nc 
Control/Workflow/Patterns.hs view
@@ -102,7 +102,7 @@ split :: ( Typeable b            , Serialize b            , HasFork io-           , CMC.MonadCatch io)+           , CMC.MonadMask io)           => [a -> Workflow io b] -> a  -> Workflow io [ActionWF b] split actions a = mapM (\ac ->      do@@ -161,7 +161,7 @@ --         , Serialize [a]          , Typeable a          , HasFork io-         , CMC.MonadCatch io)+         , CMC.MonadMask io)          => Integer          -> (a ->   STM Select)          -> [ActionWF a]@@ -241,7 +241,7 @@ --         , Serialize [b]          , Typeable b          , HasFork io-         , CMC.MonadCatch io)+         , CMC.MonadMask io)       => Integer       -> [a -> Workflow io  b]       -> ([b] -> Workflow io c)@@ -260,7 +260,7 @@      , Typeable b      , Monoid b      , HasFork io-     , CMC.MonadCatch io)+     , CMC.MonadMask io)      => Integer      -> [a -> Workflow io b]      -> a
Workflow.cabal view
@@ -1,5 +1,5 @@ name: Workflow-version: 0.8.0.9+version: 0.8.1 cabal-version: >= 1.6 build-type: Simple license: BSD3@@ -24,7 +24,7 @@              See "Control.Workflow" for details              .              In this release:-             * minor changes+             * Adaptation for MonadMask instance introduced in the package exceptions-0.6  category: Control, Workflow @@ -38,10 +38,10 @@   library-    build-depends: exceptions -any, RefSerialize ==0.3.1.* ,-                   TCache -any && <1.0, base >=4 && <5, binary -any, bytestring -any,-                   containers -any, directory -any, extensible-exceptions -any,-                    mtl -any, old-time -any, stm >2, vector -any+    build-depends: exceptions >= 0.6, RefSerialize  ,+                   TCache , base >=4 && <5, binary , bytestring ,+                   containers , directory -any, extensible-exceptions ,+                    mtl , old-time , stm >2, vector      exposed-modules: Control.Workflow                      Control.Workflow.Configuration