-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | IO without any non-error, synchronous exceptions
--   
--   When you've caught all the exceptions that can be handled safely, this
--   is what you're left with.
--   
--   It is intended that you use qualified imports with this library.
--   
--   
--   import UnexceptionalIO (UIO)
--   import qualified UnexceptionalIO as UIO
--   
@package unexceptionalio
@version 0.3.0

-- | When you've caught all the exceptions that can be handled safely, this
--   is what you're left with.
--   
--   
--   runEitherIO . fromIO ≡ id
--   
module UnexceptionalIO

-- | IO without any non-error, synchronous exceptions
data UIO a

-- | Polymorphic base without any non-error, synchronous exceptions
class Unexceptional m
liftUIO :: Unexceptional m => UIO a -> m a

-- | Catch any non-error, synchronous exceptions in an IO action
fromIO :: IO a -> UIO (Either SomeException a)

-- | Re-embed UIO into IO
runUIO :: UIO a -> IO a

-- | Re-embed UIO and possible exception back into IO
runEitherIO :: (Exception e) => UIO (Either e a) -> IO a

-- | You promise that e covers all non-error, synchronous
--   exceptions thrown by this IO action
--   
--   This function is partial if you lie
fromIO' :: (Exception e) => IO a -> UIO (Either e a)

-- | You promise there are no exceptions thrown by this IO action
unsafeFromIO :: IO a -> UIO a

-- | Catch all exceptions, except for asynchronous exceptions found in
--   base
syncIO :: IO a -> IO (Either SomeException a)
instance GHC.Base.Functor UnexceptionalIO.UIO
instance GHC.Base.Applicative UnexceptionalIO.UIO
instance GHC.Base.Monad UnexceptionalIO.UIO
instance Control.Monad.Fix.MonadFix UnexceptionalIO.UIO
instance UnexceptionalIO.Unexceptional UnexceptionalIO.UIO
instance UnexceptionalIO.Unexceptional GHC.Types.IO
