monad-skeleton-0.1.5: Monads of program skeleta

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Zombie

Synopsis

Documentation

data Zombie t a where Source #

Zombie is a variant of Skeleton which has an Alternative instance.

Constructors

Sunlight :: Zombie t a 
ReturnZ :: a -> Zombie t a -> Zombie t a 
BindZ :: t x -> Cat (Kleisli (Zombie t)) x a -> Zombie t a -> Zombie t a 

Instances

Monad (Zombie t) Source # 

Methods

(>>=) :: Zombie t a -> (a -> Zombie t b) -> Zombie t b #

(>>) :: Zombie t a -> Zombie t b -> Zombie t b #

return :: a -> Zombie t a #

fail :: String -> Zombie t a #

Functor (Zombie t) Source # 

Methods

fmap :: (a -> b) -> Zombie t a -> Zombie t b #

(<$) :: a -> Zombie t b -> Zombie t a #

Applicative (Zombie t) Source # 

Methods

pure :: a -> Zombie t a #

(<*>) :: Zombie t (a -> b) -> Zombie t a -> Zombie t b #

(*>) :: Zombie t a -> Zombie t b -> Zombie t b #

(<*) :: Zombie t a -> Zombie t b -> Zombie t a #

Alternative (Zombie t) Source # 

Methods

empty :: Zombie t a #

(<|>) :: Zombie t a -> Zombie t a -> Zombie t a #

some :: Zombie t a -> Zombie t [a] #

many :: Zombie t a -> Zombie t [a] #

MonadPlus (Zombie t) Source # 

Methods

mzero :: Zombie t a #

mplus :: Zombie t a -> Zombie t a -> Zombie t a #

liftZ :: t a -> Zombie t a Source #

Lift a unit action

embalm :: MonadView t (Zombie t) a -> Zombie t a Source #

Turn a decomposed form into a composed form.

disembalm :: Zombie t a -> [MonadView t (Zombie t) a] Source #

Decompose a zombie as a list of possibilities.

hoistZombie :: forall s t a. (forall x. s x -> t x) -> Zombie s a -> Zombie t a Source #