HORIZON HASKELLDocslts/ghc-9.14.x7a6c33e2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

Moduletransformers-0.6.1.2Haskell2010

Control.Monad.Trans.Maybe

The MaybeT monad transformer extends a monad with the ability to exit the computation without returning a value.

A sequence of actions produces a value only if all the actions in the sequence do. If one exits, the rest of the sequence is skipped and the composite action exits.

For a variant allowing a range of exception values, see Control.Monad.Trans.Except.

Contents
  1. The MaybeT monad transformer
  2. Monad transformations
  3. Lifting other operations
Synopsis

The MaybeT monad transformer

newtypenewtype MaybeT (m :: Type -> Type) a

The parameterizable maybe monad, obtained by composing an arbitrary monad with the Maybe monad.

Computations are actions that may produce a value or exit.

The return function yields a computation that produces that value, while >>= sequences two subcomputations, exiting if either computation does.

Constructors

Instances25MonadTrans, Generic1, Monad, Functor, MonadFix, MonadFail, …

Monad transformations

Lifting other operations