monad-state-0.1.1.2: Utility library for monads, particularly those involving state

Control.Monad.Abort.Class

Synopsis

Documentation

type Abort r = AbortT r Identity

An abort monad, parametrized by the type r of the value to return.

newtype AbortT r m a

An abort monad transformer parametrized by

  • r - the value that will ultimately be returned; and
  • m - the inner monad.

The AbortT type wraps a monadic value that is either

  • Left r, which indicates that the monadic computation has terminated with result r and so all further steps in the computation should be ignored; or
  • Right a, which indicates that the computation is proceding normally and that its current value is a.

Constructors

AbortT 

Fields

unwrapAbortT :: m (Either r a)
 

class Monad m => MonadAbort m whereSource

Associated Types

type AbortResultType m Source

Methods

abort :: AbortResultType m -> m aSource