packages feed

unexceptionalio-trans 0.4.0 → 0.5.0

raw patch · 2 files changed

+14/−12 lines, 2 filesdep ~unexceptionalio

Dependency ranges changed: unexceptionalio

Files

UnexceptionalIO/Trans.hs view
@@ -12,12 +12,12 @@ 	UIO.UIO, 	UIO.Unexceptional(..), 	fromIO,-	run,-	runExceptIO,-	-- * Unsafe entry points #ifdef __GLASGOW_HASKELL__ 	fromIO', #endif+	run,+	runExceptIO,+	-- * Unsafe entry points 	UIO.unsafeFromIO, 	-- * Pseudo exceptions 	UIO.SomeNonPseudoException,@@ -29,7 +29,8 @@ 	UIO.bracket, #if MIN_VERSION_base(4,6,0) 	UIO.forkFinally,-	UIO.fork+	UIO.fork,+	UIO.ChildThreadError(..) #endif #endif ) where@@ -62,12 +63,13 @@ fromIO :: (UIO.Unexceptional m) => IO a -> Trans.ExceptT UIO.SomeNonPseudoException m a fromIO = Trans.ExceptT . UIO.fromIO --- | You promise that 'e' covers all exceptions but 'PseudoException'---   thrown by this 'IO' action------ This function is partial if you lie-fromIO' :: (Exception e, UIO.Unexceptional m) => IO a -> Trans.ExceptT e m a-fromIO' = Trans.ExceptT . UIO.fromIO'+-- | Catch any 'e' in an 'IO' action, with a default mapping for+--   unexpected cases+fromIO' :: (Exception e, UIO.Unexceptional m) =>+	(UIO.SomeNonPseudoException -> e) -- ^ Default if an unexpected exception occurs+	-> IO a+	-> Trans.ExceptT e m a+fromIO' f = Trans.ExceptT . UIO.fromIO' f  -- | Re-embed 'UIO' into 'MonadIO' run :: (MonadIO m) => UIO.UIO a -> m a
unexceptionalio-trans.cabal view
@@ -1,9 +1,9 @@ name:            unexceptionalio-trans-version:         0.4.0+version:         0.5.0 cabal-version:   >=1.8 license:         OtherLicense license-file:    COPYING-copyright:       © 2013-2014 Stephen Paul Weber+copyright:       © 2018 Stephen Paul Weber category:        Control author:          Stephen Paul Weber <singpolyma@singpolyma.net> maintainer:      Stephen Paul Weber <singpolyma@singpolyma.net>