packages feed

failable 1.2.1.0 → 1.2.2.0

raw patch · 3 files changed

+5/−7 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

failable.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: a12b7ae7ae934beec28ed91e40ed4a43c1eceb1d8828a108bab9bdb63c453133+-- hash: 8cc31ec3ac9375294a36a9da93d185c21007f0c218f60c268b752c2d859ae579  name:           failable-version:        1.2.1.0+version:        1.2.2.0 synopsis:       A 'Failable' error monad class to unify failure across monads that can fail description:    This library contains a 'Failable' error monad class to unify failure across monads and transformers most commonly used to implement pipelines that can fail and does so in a simple nonsense way by providing the means of signaling a computation "failure" while striving to keep the failure behaviour consistent with the actual definition of the monad/transformer. Please refer to the README file for a more elaborate description and some examples. category:       control, exceptions, monad
package.yaml view
@@ -1,5 +1,5 @@ name:        failable-version:     1.2.1.0+version:     1.2.2.0 license:     BSD3 author:      "Erick Gonzalez" maintainer:  "erick@codemonkeylabs.de"
src/Control/Monad/Failable.hs view
@@ -1,7 +1,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GADTs #-}-{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE UndecidableInstances #-} @@ -80,6 +79,7 @@ import Control.Monad.Reader         (ReaderT, runReaderT, ask) import Control.Monad.Trans          (MonadTrans, lift) import Control.Monad.Trans.Maybe    (MaybeT(..), runMaybeT)+import System.IO.Error              (tryIOError)  instance Exception () @@ -209,7 +209,5 @@ -- failableIO :: (Failable m, MonadIO m) => IO a -> m a failableIO actions = do-  result :: Either SomeException a <- liftIO $ tryActions `catch` someError+  result <- liftIO $ tryIOError actions   either failure return result-    where tryActions = actions >>= return . Right-          someError  = return . Left