unexceptionalio-0.1.0: IO without any non-error, synchronous exceptions

Safe HaskellSafe-Inferred

UnexceptionalIO

Contents

Description

When you've caught all the exceptions that can be handled safely, this is what you're left with.

 runEitherIO . fromIO ≡ id

Synopsis

Documentation

data UnexceptionalIO a Source

IO without any non-error, synchronous exceptions

fromIO :: IO a -> EitherT SomeException UnexceptionalIO aSource

Catch any non-error, synchronous exceptions in an IO action

runEitherIO :: (MonadIO m, Exception e) => EitherT e UnexceptionalIO a -> m aSource

Re-embed UnexceptionalIO and possible exception back into IO

Unsafe entry points

fromIO' :: Exception e => IO a -> EitherT e UnexceptionalIO aSource

You promise that e covers all non-error, synchronous exceptions thrown by this IO action

This function is partial if you lie

unsafeFromIO :: IO a -> UnexceptionalIO aSource

You promise there are no exceptions thrown by this IO action