{-# LANGUAGE RankNTypes #-}
module Control.Comonad.Hoist.Class
( ComonadHoist(cohoist)
) where
import Control.Comonad
import Control.Monad.Trans.Identity
class ComonadHoist t where
cohoist :: (Comonad w, Comonad v) => (forall x. w x -> v x) -> t w a -> t v a
instance ComonadHoist IdentityT where
cohoist l = IdentityT . l . runIdentityT
{-# INLINE cohoist #-}