Control.Comonad.Hoist.Class

comonad-transformers-2.0.2: Comonad transformers

Portability | portable
Stability | provisional
Maintainer | Edward Kmett <ekmett@gmail.com>

Control.Comonad.Hoist.Class

Description

# Documentation

class ComonadHoist t where

Methods

cohoist :: Comonad w => t w a -> t Identity a

Ideally we would offer a way to lift comonad homomorphisms but this isn't Haskell 98, so we settle for the most common case here.

     liftTrans :: (forall a. w a -> v a) -> t w a -> t v a
     cohoist = liftTrans (Identity . extract)

Instances

ComonadHoist IdentityT |
ComonadHoist (EnvT e) |
ComonadHoist (EnvT e) |
ComonadHoist (StoreT s) |
ComonadHoist (StoreT s) |
ComonadHoist (StoreT s) |
(Semigroup m, Monoid m) => ComonadHoist (TracedT m) |
ComonadHoist (TracedT m) |