Created
September 2, 2014 20:46
-
-
Save singpolyma/2bb4021a6caaba34c2cb to your computer and use it in GitHub Desktop.
Control.Error.UnexceptionalIO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Control.Error.UnexceptionalIO ( | |
| UIO.UnexceptionalIO, | |
| UIO.UIO, | |
| fromIO, | |
| runUnexceptionalIO, | |
| runEitherIO, | |
| fromIO', | |
| UIO.unsafeFromIO, | |
| syncIO | |
| ) where | |
| import Control.Monad.Trans.Either (EitherT(..), runEitherT) | |
| import Control.Exception (SomeException, Exception) | |
| import Control.Monad.IO.Class (MonadIO, liftIO) | |
| import UnexceptionalIO (UnexceptionalIO) | |
| import qualified UnexceptionalIO as UIO | |
| fromIO :: IO a -> EitherT SomeException UnexceptionalIO a | |
| fromIO = EitherT . UIO.fromIO | |
| runUnexceptionalIO :: (MonadIO m) => UnexceptionalIO a -> m a | |
| runUnexceptionalIO = liftIO . UIO.runUnexceptionalIO | |
| runEitherIO :: (MonadIO m, Exception e) => EitherT e UnexceptionalIO a -> m a | |
| runEitherIO = liftIO . UIO.runEitherIO . runEitherT | |
| fromIO' :: Exception e => IO a -> EitherT e UnexceptionalIO a | |
| fromIO' = EitherT . UIO.fromIO' | |
| syncIO :: IO a -> EitherT SomeException IO a | |
| syncIO = EitherT . UIO.syncIO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment