free-4.2: Monads for free

Portability | fundeps, MPTCs
Stability | experimental
Maintainer | Edward Kmett <ekmett@gmail.com>
Safe Haskell | Safe-Inferred

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 Source

Allows you to peel a layer off a cofree comonad.

Methods

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

Remove a layer.

Instances

ComonadCofree Maybe NonEmpty |
ComonadCofree f w => ComonadCofree f (IdentityT w) |
Functor f => ComonadCofree f (Cofree f) |
Comonad w => ComonadCofree Identity (CoiterT w) |
(ComonadCofree f w, Semigroup m, Monoid m) => ComonadCofree f (TracedT m w) |
ComonadCofree f w => ComonadCofree f (StoreT s w) |
ComonadCofree f w => ComonadCofree f (EnvT e w) |
(Functor f, Comonad w) => ComonadCofree f (CofreeT f w) |
ComonadCofree (Const b) ((,) b) |