-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A 'Failable' error monad class to unify failure across monads that can fail -- -- Please see the README on Gitlab at -- https://gitlab.com/codemonkeylabs/failable#readme @package failable @version 0.1.0.2 -- | This library provides a Failable error monad class to unify -- errors across monads and transformers most commonly used to implement -- pipelines that can fail. module Control.Monad.Failable -- | The Failable class. A Monad which is an instance of this class -- can be used as a context in a function running in one with this class -- constraint, in order to report error conditions class (Monad m) => Failable m -- | trigger a failure. It takes an exception value as argument and it -- returns whatever might be used to abort a monadic computation in the -- monad instantiating this class. failure :: (Failable m, Exception e) => e -> m a instance Control.Monad.Failable.Failable GHC.Types.IO instance Control.Monad.Failable.Failable [] instance Control.Monad.Failable.Failable GHC.Maybe.Maybe instance (e Data.Type.Equality.~ GHC.Exception.Type.SomeException) => Control.Monad.Failable.Failable (Data.Either.Either e) instance GHC.Base.Monad m => Control.Monad.Failable.Failable (Control.Monad.Trans.Maybe.MaybeT m) instance (GHC.Base.Monad m, e Data.Type.Equality.~ GHC.Exception.Type.SomeException) => Control.Monad.Failable.Failable (Control.Monad.Trans.Except.ExceptT e m)