HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduletransformers-0.6.1.1Haskell2010

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.

  • 1 type
  • 8 values

The MaybeT monad transformer

2 declarations
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

3 declarations

Lifting other operations

4 declarations