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

Safe HaskellNone
LanguageHaskell2010

Data.Bicotraversable

Documentation

class Bifunctor f => Bicotraversable f where Source #

Methods

bicollect :: Functor g => (a -> f b c) -> g a -> f (g b) (g c) Source #

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

bicotraverse :: Functor g => (g a -> b) -> (g c -> d) -> g (f a c) -> f b d Source #

Instances

Bicotraversable (,) Source # 

Methods

bicollect :: Functor g => (a -> (b, c)) -> g a -> (g b, g c) Source #

bicosequence :: Functor g => g (a, b) -> (g a, g b) Source #

bicotraverse :: Functor g => (g a -> b) -> (g c -> d) -> g (a, c) -> (b, d) Source #

Bicotraversable (Const *) Source # 

Methods

bicollect :: Functor g => (a -> Const * b c) -> g a -> Const * (g b) (g c) Source #

bicosequence :: Functor g => g (Const * a b) -> Const * (g a) (g b) Source #

bicotraverse :: Functor g => (g a -> b) -> (g c -> d) -> g (Const * a c) -> Const * b d Source #

(Cotraversable f, Bicotraversable s) => Bicotraversable (Tannen * * * f s) Source # 

Methods

bicollect :: Functor g => (a -> Tannen * * * f s b c) -> g a -> Tannen * * * f s (g b) (g c) Source #

bicosequence :: Functor g => g (Tannen * * * f s a b) -> Tannen * * * f s (g a) (g b) Source #

bicotraverse :: Functor g => (g a -> b) -> (g c -> d) -> g (Tannen * * * f s a c) -> Tannen * * * f s b d Source #

(Bicotraversable s, Cotraversable f, Cotraversable g) => Bicotraversable (Biff * * * * s f g) Source # 

Methods

bicollect :: Functor g => (a -> Biff * * * * s f g b c) -> g a -> Biff * * * * s f g (g b) (g c) Source #

bicosequence :: Functor g => g (Biff * * * * s f g a b) -> Biff * * * * s f g (g a) (g b) Source #

bicotraverse :: Functor g => (g a -> b) -> (g c -> d) -> g (Biff * * * * s f g a c) -> Biff * * * * s f g b d Source #