packages feed

control-monad-exception 0.8.0.1 → 0.8.0.2

raw patch · 3 files changed

+6/−10 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Control.Monad.Exception.Base: instance (Exception e, Throws e l, Monad m, Failure e m) => Failure e (EMT l m)
+ Control.Monad.Exception.Base: instance (Exception e, Throws e l, Monad m) => Failure e (EMT l m)

Files

Control/Monad/Exception.hs view
@@ -43,13 +43,10 @@ -- ** Hierarchies of Exceptions -- $hierarchies --- ** Unchecked and unexplicit exceptions+-- ** Unchecked exceptions -- *** Unchecked exceptions -- $unchecked --- *** Unexplicit exceptions--- $unexplicit- -- ** Stack Traces -- $stacktraces @@ -81,7 +78,6 @@  import Control.Monad.Exception.Base import Control.Monad.Exception.Catch-import Control.Monad.Exception.Throws import Control.Failure import Control.Monad.Loc import Data.Typeable
Control/Monad/Exception/Base.hs view
@@ -103,7 +103,7 @@   pure  = return   (<*>) = ap -instance (Exception e, Throws e l, Monad m, Failure e m) => Failure e (EMT l m) where+instance (Exception e, Throws e l, Monad m) => Failure e (EMT l m) where   failure = throw  instance (Exception e, Throws e l, Failure e m, Monad m) => WrapFailure e (EMT l m) where@@ -159,7 +159,7 @@ --   If the first computation rises an exception, the second computation is run --   and then the exception is rethrown. finally :: Monad m => EMT l m a -> EMT l m b -> EMT l m a-finally m sequel = do { v <- m `onException` sequel; sequel; return v}+finally m sequel = do { v <- m `onException` sequel; _ <- sequel; return v}   -- | Like finally, but performs the second computation only when the first one@@ -168,14 +168,14 @@ onException (EMT m) (EMT sequel) = EMT $ do                                      ev <- m                                      case ev of-                                       Left{}  -> do { sequel; return ev}+                                       Left{}  -> do { _ <- sequel; return ev}                                        Right{} -> return ev  bracket :: Monad m => EMT l m a        -- ^ acquire resource                    -> (a -> EMT l m b) -- ^ release resource                    -> (a -> EMT l m c) -- ^ computation                    -> EMT l m c-bracket acquire release run = do { k <- acquire; run k `finally` release k }+bracket acquire release run = do { k <- acquire; run k `finally` (release k) }  -- | Capture an exception e, wrap it, and rethrow. --   Keeps the original monadic call trace.
control-monad-exception.cabal view
@@ -1,5 +1,5 @@ name: control-monad-exception-version: 0.8.0.1+version: 0.8.0.2 Cabal-Version:  >= 1.6 build-type: Simple license: PublicDomain