-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Please see the README on GitHub at -- https://github.com/matsubara0507/mixlogue#readme @package fallible @version 0.1.0 module Data.Fallible -- | Types that may contain failures. class Applicative f => Fallible f where { type family Failure f :: *; } -- | Get a success or a failure. -- --
--   tryFallible (pure a) ≡ Right a
--   
tryFallible :: Fallible f => f a -> Either (Failure f) a (??=) :: (Applicative f, Fallible t) => t a -> (Failure t -> f a) -> f a infixl 1 ??= (???) :: (Applicative f, Fallible t) => t a -> f a -> f a infixl 1 ??? (!?=) :: (Monad m, Fallible t) => m (t a) -> (Failure t -> m a) -> m a infixl 1 !?= (!??) :: (Monad m, Fallible t) => m (t a) -> m a -> m a infixl 1 !?? catchFailure :: (Monad m, Fallible t) => m (t a) -> (Failure t -> m a) -> m a catchFailure_ :: (Monad m, Fallible t) => m (t a) -> m a -> m a exit :: m r -> ContT r m a exitA :: Applicative m => r -> ContT r m a -- | Lift a computation from the argument monad to the constructed monad. lift :: (MonadTrans t, Monad m) => m a -> t m a instance Data.Fallible.Fallible Data.Functor.Identity.Identity instance GHC.Base.Monoid e => Data.Fallible.Fallible (Data.Functor.Const.Const e) instance Data.Fallible.Fallible Data.Proxy.Proxy instance Data.Fallible.Fallible GHC.Maybe.Maybe instance Data.Fallible.Fallible (Data.Either.Either e)