MHask-0.3.0.0: The category of monads

Safe HaskellSafe-Inferred

MHask.Indexed.Comonad

Description

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

Synopsis

Documentation

class IxCopointed t => IxComonad t whereSource

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

Methods

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.