-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A simple type class for success/failure computations.
--
-- A simple type class for success/failure computations.
@package failure
@version 0.2.0
-- | Type classes for returning failures.
--
-- Note: This module used to contain a lot more functionality, but I
-- believe it was unused functionality. If you want any of it back, just
-- email me.
module Control.Failure
class Monad f => Failure e f
failure :: Failure e f => e -> f v
-- | Convert to a SomeException via toException before
-- calling failure.
exception :: (Exception e, Failure SomeException m) => e -> m a
instance (MonadTrans t, Failure e m, Monad (t m)) => Failure e (t m)
instance Exception e => Failure e IO
instance Failure e (Either e)
instance Failure e []
instance Failure e Maybe