MHask-0.3.0.0: The category of monads

Safe HaskellSafe-Inferred

MHask.Monad

Description

Compare to base.Prelude (Monad)

Synopsis

Documentation

class Pointed t => Monad t whereSource

Dual of MHask.Comonad

Methods

join :: Monad m => t (t m) ~> t mSource

bind :: (Monad m, Monad n) => (m ~> t n) -> t m ~> t nSource

fmapMonad :: (Monad m, Monad n, Monad (t n), Monad t) => (m ~> n) -> t m ~> t nSource

If you define your Monad in terms of bind and return, then you get a free implementation of fmap which can be used for Functor.