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

Safe HaskellNone
LanguageHaskell2010

Data.Bicotraversable

Documentation

class Bifunctor f => Bicotraversable f where Source #

Minimal complete definition

Nothing

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

Defined in Data.Bicotraversable

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 :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Bicotraversable

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

Defined in Data.Bifunctor.Tannen

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

Defined in Data.Bifunctor.Biff

Methods

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

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

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