monad-coroutine 0.9.1.3 → 0.9.2
raw patch · 2 files changed
+6/−5 lines, 2 filesdep ~transformers-compatPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: transformers-compat
API changes (from Hackage documentation)
Files
- Control/Monad/Coroutine.hs +4/−3
- monad-coroutine.cabal +2/−2
Control/Monad/Coroutine.hs view
@@ -98,15 +98,16 @@ instance (Functor s, Functor m, Monad m) => Applicative (Coroutine s m) where pure x = Coroutine (return (Right x)) (<*>) = ap+ t *> f = Coroutine (resume t >>= apply f)+ where apply fc (Right _) = resume fc+ apply fc (Left s) = return (Left (fmap (>> fc) s)) instance (Functor s, Monad m) => Monad (Coroutine s m) where return = pure t >>= f = Coroutine (resume t >>= apply f) where apply fc (Right x) = resume (fc x) apply fc (Left s) = return (Left (fmap (>>= fc) s))- t >> f = Coroutine (resume t >>= apply f)- where apply fc (Right _) = resume fc- apply fc (Left s) = return (Left (fmap (>> fc) s))+ (>>) = (*>) instance (Functor s, MonadFail m) => MonadFail (Coroutine s m) where fail msg = Coroutine (Right <$> fail msg)
monad-coroutine.cabal view
@@ -1,5 +1,5 @@ Name: monad-coroutine-Version: 0.9.1.3+Version: 0.9.2 Cabal-Version: >= 1.10 Build-Type: Simple Synopsis: Coroutine monad transformer for suspending and resuming monadic computations@@ -23,6 +23,6 @@ Library Exposed-Modules: Control.Monad.Coroutine, Control.Monad.Coroutine.SuspensionFunctors, Control.Monad.Coroutine.Nested- Build-Depends: base >= 4.9 && < 5, transformers >= 0.2 && < 0.7, transformers-compat >= 0.3 && < 0.7, monad-parallel < 1.0+ Build-Depends: base >= 4.9 && < 5, transformers >= 0.2 && < 0.7, transformers-compat >= 0.3 && < 0.8, monad-parallel < 1.0 if impl(ghc >= 7.0.0) default-language: Haskell2010