packages feed

safe-exceptions 0.1.5.0 → 0.1.6.0

raw patch · 4 files changed

+12/−7 lines, 4 files

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.1.6.0++* Reuse the `Handler` definition from `Control.Monad.Catch`+ ## 0.1.5.0  * Re-export `Control.Exception.assert`
README.md view
@@ -2,7 +2,9 @@  *Safe, consistent, and easy exception handling* -[![Build Status](https://travis-ci.org/fpco/safe-exceptions.svg?branch=master)](https://travis-ci.org/fpco/safe-exceptions)+[![Build Status](https://travis-ci.org/fpco/safe-exceptions.svg?branch=master)](https://travis-ci.org/fpco/safe-exceptions) [![Stackage](http://stackage.org/package/safe-exceptions/badge/lts)](http://stackage.org/lts/package/safe-exceptions)++> The documentation for this library is available on [Stackage](http://stackage.org/lts/package/safe-exceptions)  Runtime exceptions - as exposed in `base` by the `Control.Exception` module - have long been an intimidating part of the Haskell
safe-exceptions.cabal view
@@ -1,5 +1,5 @@ name:                safe-exceptions-version:             0.1.5.0+version:             0.1.6.0 synopsis:            Safe, consistent, and easy exception handling description:         Please see README.md homepage:            https://github.com/fpco/safe-exceptions#readme@@ -16,7 +16,7 @@ library   hs-source-dirs:      src   exposed-modules:     Control.Exception.Safe-  build-depends:       base >= 4.7 && < 4.10+  build-depends:       base >= 4.7 && < 4.11                      , deepseq >= 1.2 && < 1.5                      , exceptions >= 0.8 && < 0.9                      , transformers >= 0.2 && < 0.6
src/Control/Exception/Safe.hs view
@@ -91,6 +91,7 @@ import Control.Exception (Exception (..), SomeException (..), SomeAsyncException (..)) import qualified Control.Exception as E import qualified Control.Monad.Catch as C+import Control.Monad.Catch (Handler (..)) import Control.Monad (liftM) import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Typeable (Typeable, cast)@@ -431,7 +432,8 @@             C.throwM e1         Right y -> return y --- | Async safe version of 'E.bracketOnError_'+-- | A variant of 'bracketOnError' where the return value from the first+-- computation is not required. -- -- @since 0.1.0.0 bracketOnError_ :: C.MonadMask m => m a -> m b -> m c -> m c@@ -526,9 +528,6 @@ displayException :: Exception e => e -> String displayException = show #endif---- | You need this when using 'catches'.-data Handler m a = forall e . (Exception e) => Handler (e -> m a)  -- | Same as upstream 'C.catches', but will not catch asynchronous -- exceptions