bifunctors-5.5.3: Bifunctors

Safe HaskellSafe
LanguageHaskell98

Data.Bifunctor.Functor

Synopsis

Documentation

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

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

class BifunctorFunctor t where #

Minimal complete definition

bifmap

Methods

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

Instances
BifunctorFunctor (Flip :: (k2 -> k1 -> *) -> k1 -> k2 -> *) # 
Instance details

Defined in Data.Bifunctor.Flip

Methods

bifmap :: (p :-> q) -> Flip p :-> Flip q #

BifunctorFunctor (Product p :: (k1 -> k2 -> *) -> k1 -> k2 -> *) # 
Instance details

Defined in Data.Bifunctor.Product

Methods

bifmap :: (p0 :-> q) -> Product p p0 :-> Product p q #

BifunctorFunctor (Sum p :: (k1 -> k2 -> *) -> k1 -> k2 -> *) # 
Instance details

Defined in Data.Bifunctor.Sum

Methods

bifmap :: (p0 :-> q) -> Sum p p0 :-> Sum p q #

Functor f => BifunctorFunctor (Tannen f :: (k1 -> k2 -> *) -> k1 -> k2 -> *) # 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

bifmap :: (p :-> q) -> Tannen f p :-> Tannen f q #

class BifunctorFunctor t => BifunctorMonad t where #

Minimal complete definition

bireturn, (bibind | bijoin)

Methods

bireturn :: p :-> t p #

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

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

Instances
BifunctorMonad (Sum p :: (k1 -> k2 -> *) -> k1 -> k2 -> *) # 
Instance details

Defined in Data.Bifunctor.Sum

Methods

bireturn :: p0 a b -> Sum p p0 a b #

bibind :: (p0 :-> Sum p q) -> Sum p p0 :-> Sum p q #

bijoin :: Sum p (Sum p p0) a b -> Sum p p0 a b #

(Functor f, Monad f) => BifunctorMonad (Tannen f :: (k1 -> k2 -> *) -> k1 -> k2 -> *) # 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

bireturn :: p a b -> Tannen f p a b #

bibind :: (p :-> Tannen f q) -> Tannen f p :-> Tannen f q #

bijoin :: Tannen f (Tannen f p) a b -> Tannen f p a b #

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

class BifunctorFunctor t => BifunctorComonad t where #

Minimal complete definition

biextract, (biextend | biduplicate)

Methods

biextract :: t p :-> p #

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

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

Instances
BifunctorComonad (Product p :: (k1 -> k2 -> *) -> k1 -> k2 -> *) # 
Instance details

Defined in Data.Bifunctor.Product

Methods

biextract :: Product p p0 a b -> p0 a b #

biextend :: (Product p p0 :-> q) -> Product p p0 :-> Product p q #

biduplicate :: Product p p0 a b -> Product p (Product p p0) a b #

Comonad f => BifunctorComonad (Tannen f :: (k1 -> k2 -> *) -> k1 -> k2 -> *) # 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

biextract :: Tannen f p a b -> p a b #

biextend :: (Tannen f p :-> q) -> Tannen f p :-> Tannen f q #

biduplicate :: Tannen f p a b -> Tannen f (Tannen f p) a b #

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