bifunctors-5.5.2: Bifunctors

Data.Bifunctor.Functor

Synopsis

# Documentation

type (:->) p q = forall a b. p a b -> q a b infixr 0 Source #

Using parametricity as an approximation of a natural transformation in two arguments.

class BifunctorFunctor t where Source #

Minimal complete definition

bifmap

Methods

bifmap :: (p :-> q) -> t p :-> t q Source #

Instances
 BifunctorFunctor (Flip :: (k2 -> k1 -> *) -> k1 -> k2 -> *) Source # Instance detailsDefined in Data.Bifunctor.Flip Methodsbifmap :: (p :-> q) -> Flip p :-> Flip q Source # BifunctorFunctor (Product p :: (k1 -> k2 -> *) -> k1 -> k2 -> *) Source # Instance detailsDefined in Data.Bifunctor.Product Methodsbifmap :: (p0 :-> q) -> Product p p0 :-> Product p q Source # BifunctorFunctor (Sum p :: (k1 -> k2 -> *) -> k1 -> k2 -> *) Source # Instance detailsDefined in Data.Bifunctor.Sum Methodsbifmap :: (p0 :-> q) -> Sum p p0 :-> Sum p q Source # Functor f => BifunctorFunctor (Tannen f :: (k1 -> k2 -> *) -> k1 -> k2 -> *) Source # Instance detailsDefined in Data.Bifunctor.Tannen Methodsbifmap :: (p :-> q) -> Tannen f p :-> Tannen f q Source #

class BifunctorFunctor t => BifunctorMonad t where Source #

Minimal complete definition

bireturn, (bibind | bijoin)

Methods

bireturn :: p :-> t p Source #

bibind :: (p :-> t q) -> t p :-> t q Source #

bijoin :: t (t p) :-> t p Source #

Instances
 BifunctorMonad (Sum p :: (k1 -> k2 -> *) -> k1 -> k2 -> *) Source # Instance detailsDefined in Data.Bifunctor.Sum Methodsbireturn :: p0 a b -> Sum p p0 a b Source #bibind :: (p0 :-> Sum p q) -> Sum p p0 :-> Sum p q Source #bijoin :: Sum p (Sum p p0) a b -> Sum p p0 a b Source # (Functor f, Monad f) => BifunctorMonad (Tannen f :: (k1 -> k2 -> *) -> k1 -> k2 -> *) Source # Instance detailsDefined in Data.Bifunctor.Tannen Methodsbireturn :: p a b -> Tannen f p a b Source #bibind :: (p :-> Tannen f q) -> Tannen f p :-> Tannen f q Source #bijoin :: Tannen f (Tannen f p) a b -> Tannen f p a b Source #

biliftM :: BifunctorMonad t => (p :-> q) -> t p :-> t q Source #

class BifunctorFunctor t => BifunctorComonad t where Source #

Minimal complete definition

Methods

biextract :: t p :-> p Source #

biextend :: (t p :-> q) -> t p :-> t q Source #

biduplicate :: t p :-> t (t p) Source #

Instances
 BifunctorComonad (Product p :: (k1 -> k2 -> *) -> k1 -> k2 -> *) Source # Instance detailsDefined in Data.Bifunctor.Product Methodsbiextract :: Product p p0 a b -> p0 a b Source #biextend :: (Product p p0 :-> q) -> Product p p0 :-> Product p q Source #biduplicate :: Product p p0 a b -> Product p (Product p p0) a b Source # Comonad f => BifunctorComonad (Tannen f :: (k1 -> k2 -> *) -> k1 -> k2 -> *) Source # Instance detailsDefined in Data.Bifunctor.Tannen Methodsbiextract :: Tannen f p a b -> p a b Source #biextend :: (Tannen f p :-> q) -> Tannen f p :-> Tannen f q Source #biduplicate :: Tannen f p a b -> Tannen f (Tannen f p) a b Source #

biliftW :: BifunctorComonad t => (p :-> q) -> t p :-> t q Source #