uniform-error-0.1.3.1: Handling errors in the uniform framework
Safe HaskellNone
LanguageHaskell2010

Uniform.Error

Synopsis

Documentation

runErr :: ErrIO a -> IO (ErrOrVal a) Source #

runErr to avoid the depreceated message for runErrorT, which is identical

runErrorVoid :: ErrIO () -> IO () Source #

run an operation in ErrIO which is not returning anything simpler to use than runErr

undef :: Text -> a Source #

for type specification, not to be evaluated

bracketErrIO Source #

Arguments

:: ErrIO a

computation to run first ("acquire resource")

-> (a -> ErrIO b)

computation to run last ("release resource")

-> (a -> ErrIO c)

computation to run in-between

-> ErrIO c 

callIO :: IO a -> ErrIO a Source #

this is using catch to grab all errors

catchError :: Monad m => ExceptT e m a -> (e -> ExceptT e' m a) -> ExceptT e' m a Source #

errorT :: [Text] -> a Source #

a list of texts is output with failure

headNoteT :: [Text] -> [a] -> a Source #

startProg :: Show a => Text -> ErrIO a -> IO () Source #

readNote :: (Partial, Read a) => String -> String -> a #

readNote uses readEitherSafe for the error message.

headNote :: Partial => String -> [a] -> a #

liftIO :: MonadIO m => IO a -> m a #

Lift a computation from the IO monad.

class Monad m => MonadIO (m :: Type -> Type) #

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Minimal complete definition

liftIO

Instances

Instances details
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

MonadIO m => MonadIO (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftIO :: IO a -> ExceptT e m a #

(Error e, MonadIO m) => MonadIO (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

liftIO :: IO a -> ErrorT e m a #

data SomeException #

The SomeException type is the root of the exception type hierarchy. When an exception of type e is thrown, behind the scenes it is encapsulated in a SomeException.

Instances

Instances details
Show SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Exception SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Orphan instances

CharChains2 IOError Text Source # 
Instance details

Methods

show' :: IOError -> Text #