MHask- The category of monads

Safe HaskellSafe-Inferred



Compare to indexed.Control.Comonad.Indexed (IxComonad)



class IxCopointed t => IxComonad t whereSource

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


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

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

imapComonad :: (Monad m, Monad n, Monad (t j j n), IxComonad t) => (m <~ n) -> t i j m <~ t i j nSource

If you define your IxComonad in terms of iextend and iextract, then you get a free implementation of imap which can be used for IxFunctor.