monad-parallel 0.7.1.2 → 0.7.1.3
raw patch · 2 files changed
+8/−8 lines, 2 filesdep +transformers-compatdep ~transformers
Dependencies added: transformers-compat
Dependency ranges changed: transformers
Files
- Control/Monad/Parallel.hs +6/−6
- monad-parallel.cabal +2/−2
Control/Monad/Parallel.hs view
@@ -66,7 +66,7 @@ import Control.Monad (Monad, (>>=), return, liftM) import Control.Monad.Trans.Identity (IdentityT(IdentityT, runIdentityT)) import Control.Monad.Trans.Maybe (MaybeT(MaybeT, runMaybeT))-import Control.Monad.Trans.Error (ErrorT(ErrorT, runErrorT), Error)+import Control.Monad.Trans.Except (ExceptT(ExceptT), runExceptT) import Control.Monad.Trans.List (ListT(ListT, runListT)) import Control.Monad.Trans.Reader (ReaderT(ReaderT, runReaderT)) import Control.Parallel (par, pseq)@@ -159,9 +159,9 @@ where f' (Just a) (Just b) = runMaybeT (f a b) f' _ _ = return Nothing -instance (MonadParallel m, Error e) => MonadParallel (ErrorT e m) where- bindM2 f ma mb = ErrorT (bindM2 f' (runErrorT ma) (runErrorT mb))- where f' (Right a) (Right b) = runErrorT (f a b)+instance MonadParallel m => MonadParallel (ExceptT e m) where+ bindM2 f ma mb = ExceptT (bindM2 f' (runExceptT ma) (runExceptT mb))+ where f' (Right a) (Right b) = runExceptT (f a b) f' (Left e) _ = return (Left e) f' _ (Left e) = return (Left e) @@ -194,8 +194,8 @@ instance MonadFork m => MonadFork (MaybeT m) where forkExec ma = MaybeT (liftM (Just . MaybeT) $ forkExec (runMaybeT ma)) -instance (MonadFork m, Error e) => MonadFork (ErrorT e m) where- forkExec ma = ErrorT (liftM (Right . ErrorT) $ forkExec (runErrorT ma))+instance MonadFork m => MonadFork (ExceptT e m) where+ forkExec ma = ExceptT (liftM (Right . ExceptT) $ forkExec (runExceptT ma)) instance MonadFork m => MonadFork (ListT m) where forkExec ma = ListT (liftM ((:[]) . ListT) $ forkExec (runListT ma))
monad-parallel.cabal view
@@ -1,5 +1,5 @@ Name: monad-parallel-Version: 0.7.1.2+Version: 0.7.1.3 Cabal-Version: >= 1.10 Build-Type: Simple Synopsis: Parallel execution of monadic computations@@ -23,7 +23,7 @@ Library Exposed-Modules: Control.Monad.Parallel- Build-Depends: base < 5, parallel, transformers >= 0.2 && < 0.4+ Build-Depends: base < 5, parallel, transformers >= 0.2 && < 0.5, transformers-compat >= 0.3 && < 0.4 GHC-prof-options: -auto-all if impl(ghc >= 7.0.0) default-language: Haskell2010