Module
Control.Comonad.Cofree.Trans
- Package
- purescript-freet
- Repository
- purescript-contrib/purescript-freet
This module defines a lazy implementation of the cofree monad transformer.
Given a CofreeT f w a:
- 'f' is a
Functor, generally representing an AST, - 'w' is a 'Comonad',
- and 'a' is the type of the annotation.
Usually, you would use CofreeT to annotate an existing AST with
metadata such as source locations, file names, etc.
#CofreeT Source
newtype CofreeT :: (Type -> Type) -> (Type -> Type) -> Type -> Typenewtype CofreeT f w a
The cofree comonad transformer for the functor 'f'.
Constructors
Instances
(Functor w, Functor f) => Functor (CofreeT f w)(Apply w, Apply f) => Apply (CofreeT f w)(Applicative w, Apply f, Plus f) => Applicative (CofreeT f w)(Monad w, Alt f, Apply f) => Bind (CofreeT f w)(Monad w, Plus f, Apply f) => Monad (CofreeT f w)(Plus f) => MonadTrans (CofreeT f)(MonadEffect w, Plus f, Apply f) => MonadEffect (CofreeT f w)(MonadAff w, Plus f, Apply f) => MonadAff (CofreeT f w)(Comonad w, Functor f) => ComonadCofree f (CofreeT f w)ComonadTrans (CofreeT f)(Functor f, ComonadAsk e w) => ComonadAsk e (CofreeT f w)(Foldable w, Foldable f) => Foldable (CofreeT f w)(Traversable w, Traversable f) => Traversable (CofreeT f w)(Comonad w, Functor f) => Extend (CofreeT f w)(Comonad w, Functor f) => Comonad (CofreeT f w)
#runCofreeT Source
runCofreeT :: forall f w a. CofreeT f w a -> w (Tuple a (f (CofreeT f w a)))Unpack CofreeT into the inner computation.