ContentsIndex
Org.Org.Semantic.HBase.Category.MonadBottom
Synopsis
class Monad m => MonadBottom m where
getBottom :: a -> m (Maybe Exception)
catchBottom :: m a -> (Exception -> m a) -> m a
Documentation
class Monad m => MonadBottom m where
A MonadBottom can trap pure functional exceptions (such as undefined).
Methods
getBottom :: a -> m (Maybe Exception)
Is this bottom, and if so, which Exception?
catchBottom :: m a -> (Exception -> m a) -> m a

Catch bottom in the monad. Note this does not catch fail, throw or return undefined.

These get catched:

These do not get catched:

Instances
MonadBottom m => MonadBottom (Contextual m context)
MonadBottom m => MonadBottom (ContinuationPass (m k))
??? a ex p => MonadBottom (ExceptionContinuationPass p ex a)
MonadBottom m => MonadBottom (ExceptionMonad m ex)
MonadBottom m => MonadBottom (GuardContinuationPass u (m k))
MonadBottom IO
Produced by Haddock version 0.6