hs-functors-0.1.4.0: Functors from products of Haskell and its dual to Haskell

Safe HaskellNone
LanguageHaskell2010

Data.Cotraversable

Synopsis

Documentation

class Functor f => Cotraversable f where Source #

Minimal complete definition

collect | cosequence | cotraverse

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 # 
Instance details

Defined in Data.Cotraversable

Methods

collect :: Functor g => (a -> Identity b) -> g a -> Identity (g b) Source #

cosequence :: Functor g => g (Identity a) -> Identity (g a) Source #

cotraverse :: Functor g => (g a -> b) -> g (Identity a) -> Identity b Source #

Cotraversable (Proxy :: Type -> Type) Source # 
Instance details

Defined in Data.Cotraversable

Methods

collect :: Functor g => (a -> Proxy b) -> g a -> Proxy (g b) Source #

cosequence :: Functor g => g (Proxy a) -> Proxy (g a) Source #

cotraverse :: Functor g => (g a -> b) -> g (Proxy a) -> Proxy b Source #

Cotraversable f => Cotraversable (Cofree f) Source # 
Instance details

Defined in Control.Comonad.Cofree

Methods

collect :: Functor g => (a -> Cofree f b) -> g a -> Cofree f (g b) Source #

cosequence :: Functor g => g (Cofree f a) -> Cofree f (g a) Source #

cotraverse :: Functor g => (g a -> b) -> g (Cofree f a) -> Cofree f b Source #

Cotraversable f => Cotraversable (Reverse f) Source # 
Instance details

Defined in Data.Cotraversable

Methods

collect :: Functor g => (a -> Reverse f b) -> g a -> Reverse f (g b) Source #

cosequence :: Functor g => g (Reverse f a) -> Reverse f (g a) Source #

cotraverse :: Functor g => (g a -> b) -> g (Reverse f a) -> Reverse f b Source #

Cotraversable f => Cotraversable (IdentityT f) Source # 
Instance details

Defined in Data.Cotraversable

Methods

collect :: Functor g => (a -> IdentityT f b) -> g a -> IdentityT f (g b) Source #

cosequence :: Functor g => g (IdentityT f a) -> IdentityT f (g a) Source #

cotraverse :: Functor g => (g a -> b) -> g (IdentityT f a) -> IdentityT f b Source #

Cotraversable f => Cotraversable (Backwards f) Source # 
Instance details

Defined in Data.Cotraversable

Methods

collect :: Functor g => (a -> Backwards f b) -> g a -> Backwards f (g b) Source #

cosequence :: Functor g => g (Backwards f a) -> Backwards f (g a) Source #

cotraverse :: Functor g => (g a -> b) -> g (Backwards f a) -> Backwards f b Source #

Bicotraversable p => Cotraversable (Join p) Source # 
Instance details

Defined in Data.Functor.Join

Methods

collect :: Functor g => (a -> Join p b) -> g a -> Join p (g b) Source #

cosequence :: Functor g => g (Join p a) -> Join p (g a) Source #

cotraverse :: Functor g => (g a -> b) -> g (Join p a) -> Join p b Source #

Cotraversable ((->) r :: Type -> Type) Source # 
Instance details

Defined in Data.Cotraversable

Methods

collect :: Functor g => (a -> r -> b) -> g a -> r -> g b Source #

cosequence :: Functor g => g (r -> a) -> r -> g a Source #

cotraverse :: Functor g => (g a -> b) -> g (r -> a) -> r -> b Source #

(Cotraversable f, Cotraversable g) => Cotraversable (Product f g) Source # 
Instance details

Defined in Data.Cotraversable

Methods

collect :: Functor g0 => (a -> Product f g b) -> g0 a -> Product f g (g0 b) Source #

cosequence :: Functor g0 => g0 (Product f g a) -> Product f g (g0 a) Source #

cotraverse :: Functor g0 => (g0 a -> b) -> g0 (Product f g a) -> Product f g b Source #

Cotraversable f => Cotraversable (ReaderT r f) Source # 
Instance details

Defined in Data.Cotraversable

Methods

collect :: Functor g => (a -> ReaderT r f b) -> g a -> ReaderT r f (g b) Source #

cosequence :: Functor g => g (ReaderT r f a) -> ReaderT r f (g a) Source #

cotraverse :: Functor g => (g a -> b) -> g (ReaderT r f a) -> ReaderT r f b Source #

(Cotraversable f, Cotraversable g) => Cotraversable (Compose f g) Source # 
Instance details

Defined in Data.Cotraversable

Methods

collect :: Functor g0 => (a -> Compose f g b) -> g0 a -> Compose f g (g0 b) Source #

cosequence :: Functor g0 => g0 (Compose f g a) -> Compose f g (g0 a) Source #

cotraverse :: Functor g0 => (g0 a -> b) -> g0 (Compose f g a) -> Compose f g b Source #