distributed-closure-0.4.0: Serializable closures for distributed programming.

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Static

Synopsis

Documentation

class StaticApply m => StaticBind m where #

Instances of StaticBind should satisfy the following laws (writing staticMap, staticApply, staticBind as infix (<$>), (<*>), (>>=), respectively):

(m >>= f) >>= g = m >>= static (.) `cap` (staticFlippedBind g) cap f
staticJoin . staticJoin = staticJoin . staticMap (static staticJoin)

where

staticFlippedBind :: Closure (b -> m c) -> Closure (m b -> m c)
staticFlippedBind = capDup (static (flip staticBind))

Minimal complete definition

staticBind | staticJoin

Methods

staticBind :: (Typeable a, Typeable b) => m a -> Closure (a -> m b) -> m b #

staticJoin :: Typeable a => m (m a) -> m a #

Instances
StaticBind Closure # 
Instance details

Defined in Control.Monad.Static

Methods

staticBind :: (Typeable a, Typeable b) => Closure a -> Closure (a -> Closure b) -> Closure b #

staticJoin :: Typeable a => Closure (Closure a) -> Closure a #

class (StaticApplicative m, StaticBind m) => StaticMonad m #

Instances
(StaticApplicative m, StaticBind m) => StaticMonad m # 
Instance details

Defined in Control.Monad.Static