free-4.12.4: Monads for free

Copyright(C) 2008-2011 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilityfundeps, MPTCs
Safe HaskellSafe
LanguageHaskell2010

Control.Comonad.Cofree.Class

Description

 

Synopsis

Documentation

class (Functor f, Comonad w) => ComonadCofree f w | w -> f where #

Allows you to peel a layer off a cofree comonad.

Minimal complete definition

unwrap

Methods

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

Remove a layer.

Instances

ComonadCofree [] Tree # 

Methods

unwrap :: Tree a -> [Tree a] #

ComonadCofree Maybe NonEmpty # 

Methods

unwrap :: NonEmpty a -> Maybe (NonEmpty a) #

Functor f => ComonadCofree f (Cofree f) # 

Methods

unwrap :: Cofree f a -> f (Cofree f a) #

Comonad w => ComonadCofree Identity (CoiterT w) # 

Methods

unwrap :: CoiterT w a -> Identity (CoiterT w a) #

(ComonadCofree f w, Monoid m) => ComonadCofree f (TracedT m w) # 

Methods

unwrap :: TracedT m w a -> f (TracedT m w a) #

ComonadCofree f w => ComonadCofree f (StoreT s w) # 

Methods

unwrap :: StoreT s w a -> f (StoreT s w a) #

ComonadCofree f w => ComonadCofree f (EnvT e w) # 

Methods

unwrap :: EnvT e w a -> f (EnvT e w a) #

ComonadCofree f w => ComonadCofree f (IdentityT * w) # 

Methods

unwrap :: IdentityT * w a -> f (IdentityT * w a) #

(Functor f, Comonad w) => ComonadCofree f (CofreeT f w) # 

Methods

unwrap :: CofreeT f w a -> f (CofreeT f w a) #

ComonadCofree (Const * b) ((,) b) # 

Methods

unwrap :: (b, a) -> Const * b (b, a) #