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

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Static

Synopsis

Documentation

class StaticApply m => StaticBind m where Source #

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 Source #

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