packages feed

errors-ext 0.1 → 0.1.1

raw patch · 3 files changed

+14/−3 lines, 3 files

Files

errors-ext.cabal view
@@ -1,5 +1,5 @@ name: errors-ext-version: 0.1+version: 0.1.1 synopsis: A bracket function for ExceptT over IO monad. description: A bracket function for ExceptT over IO monad. homepage: https://github.com/A1-Triard/errors-ext#readme
src/Control/Error/Extensions.hs view
@@ -14,6 +14,18 @@ -- limitations under the License. -- +-- |+-- Module      : Control.Error.Extensions+-- Copyright   : (c) 2007 Warlock <internalmike@gmail.com>+--+-- License     : Apache+-- Maintainer  : internalmike@gmail.com+-- Stability   : experimental+-- Portability : GHC+--+-- A bracket function for ExceptT over IO monad.+--+ module Control.Error.Extensions   ( bracketE   , bracketE_@@ -25,7 +37,7 @@ import Control.Monad.Trans.Class import Control.Monad.Trans.Except --- | Analogous to 'bracket', but for ExceptT over IO.+-- | Analogous to 'bracket', but for 'ExceptT' over 'IO'. bracketE :: ExceptT e IO a -> (a -> ExceptT e IO b) -> (a -> ExceptT e IO c) -> ExceptT e IO c bracketE acquire release action = (hoistEither =<<) $ lift $ do   resource <- runExceptT acquire
test/Control/Error/Extensions/Spec.hs view
@@ -19,7 +19,6 @@   ) where  import Test.HUnit.Base hiding (Label)-import Test.HUnit.Text import Control.Error.Extensions import Control.Exception import Control.Monad.Trans.Class