serokell-util-0.1.2.4: General-purpose functions by Serokell

Safe HaskellNone
LanguageHaskell2010

Serokell.Util.Exceptions

Contents

Description

Bitgram's general-purpose exceptions. They may be useful when you need a simple instance of Exception (e. g. in MonadThrow context)

Synopsis

Documentation

data EmptyException Source #

Use this type if you want to signal about error and there may be only one reason for it

Constructors

EmptyException 

eitherToFail :: (Monad m, e ~ SomeException) => Either e a -> m a Source #

Convert MonadThrow to arbitrary monad using fail to report error Useful when you have MonadThrow and want to use it in another monad context which uses fail for errors

Orphan instances