basement-0.0.2: Foundation scrap box of array & string

LicenseBSD-style
MaintainerPsychohistorians
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Basement.Compat.MonadTrans

Description

An internal and really simple monad transformers, without any bells and whistse.

Synopsis

Documentation

newtype State s m a Source #

Simple State monad

Constructors

State 

Fields

Instances

Monad m => Monad (State r m) Source # 

Methods

(>>=) :: State r m a -> (a -> State r m b) -> State r m b #

(>>) :: State r m a -> State r m b -> State r m b #

return :: a -> State r m a #

fail :: String -> State r m a #

Monad m => Functor (State s m) Source # 

Methods

fmap :: (a -> b) -> State s m a -> State s m b #

(<$) :: a -> State s m b -> State s m a #

Monad m => Applicative (State s m) Source # 

Methods

pure :: a -> State s m a #

(<*>) :: State s m (a -> b) -> State s m a -> State s m b #

(*>) :: State s m a -> State s m b -> State s m b #

(<*) :: State s m a -> State s m b -> State s m a #

newtype Reader r m a Source #

Simple Reader monad

Constructors

Reader 

Fields

Instances

Monad m => Monad (Reader r m) Source # 

Methods

(>>=) :: Reader r m a -> (a -> Reader r m b) -> Reader r m b #

(>>) :: Reader r m a -> Reader r m b -> Reader r m b #

return :: a -> Reader r m a #

fail :: String -> Reader r m a #

Monad m => Functor (Reader r m) Source # 

Methods

fmap :: (a -> b) -> Reader r m a -> Reader r m b #

(<$) :: a -> Reader r m b -> Reader r m a #

Monad m => Applicative (Reader r m) Source # 

Methods

pure :: a -> Reader r m a #

(<*>) :: Reader r m (a -> b) -> Reader r m a -> Reader r m b #

(*>) :: Reader r m a -> Reader r m b -> Reader r m b #

(<*) :: Reader r m a -> Reader r m b -> Reader r m a #