free-5.1.7: Monads for free

Copyright | (C) 2008-2011 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | fundeps, MPTCs
Safe Haskell | Safe
Language | Haskell2010

Control.Comonad.Cofree.Class

Description

Synopsis

- class (Functor f, Comonad w) => ComonadCofree f w | w -> f where
  - unwrap :: w a -> f (w a)

# Documentation

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

Allows you to peel a layer off a cofree comonad.

Methods

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

Remove a layer.

#### Instances

Instances details

ComonadCofree [] Tree # |
Instance details Defined in Control.Comonad.Cofree.Class Methods unwrap :: Tree a -> [Tree a] #
ComonadCofree Maybe NonEmpty # |
Instance details Defined in Control.Comonad.Cofree.Class Methods unwrap :: NonEmpty a -> Maybe (NonEmpty a) #
Functor f => ComonadCofree f (Cofree f) # |
Instance details Defined in Control.Comonad.Cofree Methods unwrap :: Cofree f a -> f (Cofree f a) #
Comonad w => ComonadCofree Identity (CoiterT w) # |
Instance details Defined in Control.Comonad.Trans.Coiter Methods unwrap :: CoiterT w a -> Identity (CoiterT w a) #
(ComonadCofree f w, Monoid m) => ComonadCofree f (TracedT m w) # |
Instance details Defined in Control.Comonad.Cofree.Class Methods unwrap :: TracedT m w a -> f (TracedT m w a) #
ComonadCofree f w => ComonadCofree f (StoreT s w) # |
Instance details Defined in Control.Comonad.Cofree.Class Methods unwrap :: StoreT s w a -> f (StoreT s w a) #
ComonadCofree f w => ComonadCofree f (EnvT e w) # |
Instance details Defined in Control.Comonad.Cofree.Class Methods unwrap :: EnvT e w a -> f (EnvT e w a) #
ComonadCofree f w => ComonadCofree f (IdentityT w) # |
Instance details Defined in Control.Comonad.Cofree.Class Methods unwrap :: IdentityT w a -> f (IdentityT w a) #
(Functor f, Comonad w) => ComonadCofree f (CofreeT f w) # |
Instance details Defined in Control.Comonad.Trans.Cofree Methods unwrap :: CofreeT f w a -> f (CofreeT f w a) #
ComonadCofree (Const b :: Type -> Type) ((,) b) # |
Instance details Defined in Control.Comonad.Cofree.Class Methods unwrap :: (b, a) -> Const b (b, a) #