Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type ErrIO = ExceptT Text IO
- type ErrOrVal = Either Text
- toErrOrVal :: Either String a -> ErrOrVal a
- runErr :: ErrIO a -> IO (ErrOrVal a)
- runErrorVoid :: ErrIO () -> IO ()
- undef :: Text -> a
- fromRightEOV :: ErrOrVal a -> a
- bracketErrIO :: ErrIO a -> (a -> ErrIO b) -> (a -> ErrIO c) -> ErrIO c
- callIO :: IO a -> ErrIO a
- throwErrorWords :: [Text] -> ErrIO a
- throwErrorT :: Text -> ErrIO a
- catchError :: Monad m => ExceptT e m a -> (e -> ExceptT e' m a) -> ExceptT e' m a
- maybe2error :: Maybe a -> ErrIO a
- errorT :: [Text] -> a
- errorWords :: [Text] -> a
- fromJustNoteT :: [Text] -> Maybe a -> a
- fromRightNoteString :: Text -> Either String b -> b
- fromRightNote :: Text -> Either Text b -> b
- headNoteT :: [Text] -> [a] -> a
- startProg :: Show a => Text -> ErrIO a -> IO ()
- readNote :: (Partial, Read a) => String -> String -> a
- headNote :: Partial => String -> [a] -> a
- module Control.Monad
- module Control.Monad.Trans.Except
- liftIO :: MonadIO m => IO a -> m a
- class Monad m => MonadIO (m :: Type -> Type)
- data SomeException
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
fromRightEOV :: ErrOrVal a -> a Source #
throwErrorWords :: [Text] -> ErrIO a Source #
throwErrorT :: Text -> ErrIO a Source #
maybe2error :: Maybe a -> ErrIO a Source #
errorWords :: [Text] -> a Source #
fromJustNoteT :: [Text] -> Maybe a -> a Source #
readNote :: (Partial, Read a) => String -> String -> a #
readNote
uses readEitherSafe
for the error message.
module Control.Monad
module Control.Monad.Trans.Except
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:
Instances
MonadIO IO | Since: base-4.9.0.0 |
Defined in Control.Monad.IO.Class | |
MonadIO m => MonadIO (ExceptT e m) | |
Defined in Control.Monad.Trans.Except | |
(Error e, MonadIO m) => MonadIO (ErrorT e m) | |
Defined in Control.Monad.Trans.Error |
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
Show SomeException | Since: base-3.0 |
Defined in GHC.Exception.Type showsPrec :: Int -> SomeException -> ShowS # show :: SomeException -> String # showList :: [SomeException] -> ShowS # | |
Exception SomeException | Since: base-3.0 |
Defined in GHC.Exception.Type |