packages feed

util-exception 0.1.0.0 → 0.2.0.0

raw patch · 2 files changed

+8/−5 lines, 2 filesdep +basicdep +controldep +lifted-base-tfdep −lifted-basedep −monad-control

Dependencies added: basic, control, lifted-base-tf

Dependencies removed: lifted-base, monad-control

Files

Util/Exception.hs view
@@ -1,14 +1,16 @@ {-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE TypeFamilies #-}  module Util.Exception where  import Control.Exception.Lifted import Control.Monad-import Control.Monad.Trans.Control+import Control.Monad.Base.Control+import Data.Basic (Basic1 (..)) import Data.Monoid (Alt (..)) import Util -handleJusts :: MonadBaseControl IO m => [ExceptionPredicate b] -> (b -> m a) -> m a -> m a+handleJusts :: (MonadBaseControl m, Base m ~ IO) => [ExceptionPredicate b] -> (b -> m a) -> m a -> m a handleJusts = handleJust . fmap getAlt . foldMapA (fmap Alt . \ (ExceptionPredicate f) -> fromException >=> f)  data ExceptionPredicate b = ∀ e . Exception e => ExceptionPredicate (e -> Maybe b)
util-exception.cabal view
@@ -1,5 +1,5 @@ name:                util-exception-version:             0.1.0.0+version:             0.2.0.0 synopsis:            Exceptional utilities -- description:          license:             BSD3@@ -16,8 +16,9 @@   -- other-modules:          -- other-extensions:       build-depends:       base >=4.9 && <5-                     , lifted-base >=0.2 && <0.3-                     , monad-control >=1.0 && <1.1+                     , basic >=0.1 && <0.2+                     , control >=0.1.1 && <0.2+                     , lifted-base-tf >=0.1 && <0.2                      , util >=0.1.7 && <0.2   -- hs-source-dirs:         default-language:    Haskell2010