MHask- The category of monads

Safe HaskellSafe-Inferred



Compare to indexed.Control.Monad.Indexed (IxMonad)



class IxPointed t => IxMonad t whereSource

Indexed version of MHask.Monad. Dual of MHask.Indexed.Comonad


ijoin :: Monad m => t i j (t j k m) ~> t i k mSource

ibind :: (Monad m, Monad n) => (m ~> t j k n) -> t i j m ~> t i k nSource

imapMonad :: (Monad m, Monad n, Monad (t j j n), IxMonad t) => (m ~> n) -> t i j m ~> t i j nSource

If you define your IxMonad in terms of ibind and ireturn, then you get a free implementation of imap which can be used for IxFunctor.