| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Cotraversable
Synopsis
- class Functor f => Cotraversable f where
- collect :: Functor g => (a -> f b) -> g a -> f (g b)
- cosequence :: Functor g => g (f a) -> f (g a)
- cotraverse :: Functor g => (g a -> b) -> g (f a) -> f b
Documentation
class Functor f => Cotraversable f where Source #
Laws:
cosequence=collectidcosequence.cosequence=idcollectf =cosequence.fmapffmapf =runIdentity.collect(Identity. f)fmapdistribute.collectf =getCompose.collect(Compose. f)
Minimal complete definition
Methods
collect :: Functor g => (a -> f b) -> g a -> f (g b) Source #
cosequence :: Functor g => g (f a) -> f (g a) Source #
cotraverse :: Functor g => (g a -> b) -> g (f a) -> f b Source #
Instances
| Cotraversable Identity Source # | |
| Cotraversable (Proxy :: Type -> Type) Source # | |
| Cotraversable f => Cotraversable (Cofree f) Source # | |
| Cotraversable f => Cotraversable (Reverse f) Source # | |
| Cotraversable f => Cotraversable (IdentityT f) Source # | |
| Cotraversable f => Cotraversable (Backwards f) Source # | |
| Bicotraversable p => Cotraversable (Join p) Source # | |
| Cotraversable ((->) r :: Type -> Type) Source # | |
Defined in Data.Cotraversable | |
| (Cotraversable f, Cotraversable g) => Cotraversable (Product f g) Source # | |
| Cotraversable f => Cotraversable (ReaderT r f) Source # | |
| (Cotraversable f, Cotraversable g) => Cotraversable (Compose f g) Source # | |