HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Modulefree-5.2Haskell2010

Control.Comonad.Trans.Cofree

The cofree comonad transformer

Synopsis
  • Packagefree-5.2
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceCofree.hs
newtypenewtype CofreeT (f :: Type -> Type) (w :: Type -> Type) a

This is a cofree comonad of some functor f, with a comonad w threaded through it at each level.

Constructors

Instances17ComonadEnv, ComonadCofree, MonadTrans, ComonadTrans, ComonadHoist, Monad, …
datadata CofreeF (f :: Type -> Type) a b

This is the base functor of the cofree comonad transformer.

Constructors

  • a :< f binfixr 5
Instances23Generic1, Bifoldable, Bifunctor, Bitraversable, Eq2, Ord2, …
classclass (Functor f, Comonad w) => ComonadCofree (f :: Type -> Type) (w :: Type -> Type) | w -> f where

Allows you to peel a layer off a cofree comonad.

Methods

  • unwrap :: w a -> f (w a)

    Remove a layer.

Instances10ComonadCofree, …