| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Control.Monad.Static
Synopsis
- class StaticApply m => StaticBind m where
- staticBind :: (Typeable a, Typeable b) => m a -> Closure (a -> m b) -> m b
- staticJoin :: Typeable a => m (m a) -> m a
- class (StaticApplicative m, StaticBind m) => StaticMonad m
- staticReturn :: (StaticApplicative m, Typeable a) => Closure a -> m a
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)capfstaticJoin.staticJoin=staticJoin.staticMap(staticstaticJoin)
where
staticFlippedBind :: Closure (b -> m c) -> Closure (m b -> m c) staticFlippedBind = capDup (static (flip staticBind))
Minimal complete definition
Methods
staticBind :: (Typeable a, Typeable b) => m a -> Closure (a -> m b) -> m b Source #
staticJoin :: Typeable a => m (m a) -> m a Source #
class (StaticApplicative m, StaticBind m) => StaticMonad m Source #
Instances
| (StaticApplicative m, StaticBind m) => StaticMonad m Source # | |
Defined in Control.Monad.Static | |
staticReturn :: (StaticApplicative m, Typeable a) => Closure a -> m a Source #