packages feed

catch-fd 0.2.0.1 → 0.2.0.2

raw patch · 3 files changed

+48/−41 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Control/Monad/Catch.hs view
@@ -6,6 +6,37 @@     FlexibleInstances   , MultiParamTypeClasses   , UndecidableInstances #-}+{- |+License: BSD-style (see the file LICENSE)+Maintainer: Andy Sonnenburg <andy22286@gmail.com>+Stability: experimental+Portability: non-portable++[Computation type:]+Computations which may fail or throw exceptions; and computations which may+catch failures and thrown exceptions.++[Binding strategy:]+Failure records information about the cause/location of the failure.  Failure+values bypass the bound function; other values are used as inputs to the bound+function (same as @'Control.Monad.Error.Class.MonadError'@).++[Useful for:]+Building computations from sequences of functions that may fail; and using+exception handling to structure error handling.  The handler may or may not+throw an exception, which does not have to be of the same type as the original+thrown exception (see @'mapE'@).++[Zero and plus:]+Zero is represented by an empty error, and the plus operation executes its+second argument if the first fails (same as+@'Control.Monad.Error.Class.MonadError'@).++[Example type:]+@'Either' 'String' a@++The Throw and Catch monads.+-} module Control.Monad.Catch        ( module Exports        , MonadThrow (..)
Control/Monad/Catch/Class.hs view
@@ -129,54 +129,30 @@   m `catch` h = ErrorT $ runErrorT m >>= either (runErrorT . h) (return . Right)  #ifdef LANGUAGE_DefaultSignatures-#define MONAD_THROW(T)\+#define MONAD_THROW_1(T)\ instance MonadThrow e m => MonadThrow e (T m)-#else-#define MONAD_THROW(T)\-instance MonadThrow e m => MonadThrow e (T m) where\-  throw = lift . throw-#endif-MONAD_THROW(IdentityT)-MONAD_THROW(ListT)-MONAD_THROW(MaybeT)-MONAD_THROW(ReaderT r)-#undef MONAD_THROW--#ifdef LANGUAGE_DefaultSignatures-#define MONAD_THROW(C, T)\+#define MONAD_THROW_2(C, T)\ instance (C, MonadThrow e m) => MonadThrow e (T m) #else-#define MONAD_THROW(C, T)\-instance (C, MonadThrow e m) => MonadThrow e (T m) where\-  throw = lift . throw-#endif-MONAD_THROW(Monoid w, Lazy.RWST r w s)-MONAD_THROW(Monoid w, Strict.RWST r w s)-#undef MONAD_THROW--#ifdef LANGUAGE_DefaultSignatures-#define MONAD_THROW(T)\-instance MonadThrow e m => MonadThrow e (T m)-#else-#define MONAD_THROW(T)\+#define MONAD_THROW_1(T)\ instance MonadThrow e m => MonadThrow e (T m) where\   throw = lift . throw-#endif-MONAD_THROW(Lazy.StateT s)-MONAD_THROW(Strict.StateT s)-#undef MONAD_THROW--#ifdef LANGUAGE_DefaultSignatures-#define MONAD_THROW(C, T)\-instance (C, MonadThrow e m) => MonadThrow e (T m)-#else-#define MONAD_THROW(C, T)\+#define MONAD_THROW_2(C, T)\ instance (C, MonadThrow e m) => MonadThrow e (T m) where\   throw = lift . throw #endif-MONAD_THROW(Monoid w, Lazy.WriterT w)-MONAD_THROW(Monoid w, Strict.WriterT w)-#undef MONAD_THROW+MONAD_THROW_1(IdentityT)+MONAD_THROW_1(ListT)+MONAD_THROW_1(MaybeT)+MONAD_THROW_1(ReaderT r)+MONAD_THROW_2(Monoid w, Lazy.RWST r w s)+MONAD_THROW_2(Monoid w, Strict.RWST r w s)+MONAD_THROW_1(Lazy.StateT s)+MONAD_THROW_1(Strict.StateT s)+MONAD_THROW_2(Monoid w, Lazy.WriterT w)+MONAD_THROW_2(Monoid w, Strict.WriterT w)+#undef MONAD_THROW_1+#undef MONAD_THROW_2  instance MonadCatch e m n => MonadCatch e (IdentityT m) (IdentityT n) where   m `catch` h = IdentityT $ runIdentityT m `catch` (runIdentityT . h)
catch-fd.cabal view
@@ -1,5 +1,5 @@ name:                catch-fd-version:             0.2.0.1+version:             0.2.0.2 cabal-version:       >= 1.10 synopsis:            MonadThrow and MonadCatch, using functional dependencies description:         MonadThrow and MonadCatch, using functional dependencies