Safe Haskell | Safe-Inferred |
---|
When you've caught all the exceptions that can be handled safely, this is what you're left with.
runEitherIO . fromIO ≡ id
- data UnexceptionalIO a
- fromIO :: IO a -> EitherT SomeException UnexceptionalIO a
- runUnexceptionalIO :: MonadIO m => UnexceptionalIO a -> m a
- runEitherIO :: (MonadIO m, Exception e) => EitherT e UnexceptionalIO a -> m a
- fromIO' :: Exception e => IO a -> EitherT e UnexceptionalIO a
- unsafeFromIO :: IO a -> UnexceptionalIO a
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
runUnexceptionalIO :: MonadIO m => UnexceptionalIO a -> m aSource
Re-embed UnexceptionalIO
into IO
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