deepcontrol-0.2.0.0: Enable more deeper level style of programming than the usual Control.xxx modules express

LicenseBSD-style (see the file LICENSE)
Maintainerocean0yohsuke@gmail.com
Stabilityexperimental
Portability---
Safe HaskellSafe
LanguageHaskell2010

DeepControl.Monad.Maybe

Contents

Description

This module is just a concise mimic for Maybe Monad in mtl(monad-transformer-library). The qualifier "concise" means that this module doesn't make no attempt to transform functions of any kind of Monad automatically. So when making some new data type of MaybeT, you have to manually define involved Monad instances, for example MonadReader, MonadWriter or MonadState, by making use of the transformation functions such as trans, trans2, etc. Admittedly it is tedious though, you can deeply understand monad-transformation mechanism instead.

Synopsis

Level-1

newtype MaybeT m a Source

Constructors

MaybeT 

Fields

runMaybeT :: m (Maybe a)
 

mapMaybeT :: (m (Maybe a) -> n (Maybe b)) -> MaybeT m a -> MaybeT n b Source

liftCatch :: Catch e m (Maybe a) -> Catch e (MaybeT m) a Source