Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class StaticApply m => StaticBind m where
- class (StaticApplicative m, StaticBind m) => StaticMonad m
- staticReturn :: (StaticApplicative m, Typeable a) => 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)cap
fstaticJoin
.staticJoin
=staticJoin
.staticMap
(staticstaticJoin
)
where
staticFlippedBind :: Closure (b -> m c) -> Closure (m b -> m c) staticFlippedBind = capDup (static (flip staticBind))
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 #
(StaticApplicative m, StaticBind m) => StaticMonad m Source # | |
staticReturn :: (StaticApplicative m, Typeable a) => a -> m a Source #