Data.Bifunctor.Functor

bifunctors-5.6.2: Bifunctors

Safe Haskell | Safe
Language | Haskell2010

Data.Bifunctor.Functor

Synopsis

- type (:->) (p :: k -> k1 -> Type) (q :: k -> k1 -> Type) = forall (a :: k) (b :: k1). p a b -> q a b
- class BifunctorFunctor (t :: (k -> k1 -> Type) -> k2 -> k3 -> Type) where
  - bifmap :: forall (p :: k -> k1 -> Type) (q :: k -> k1 -> Type). (p :-> q) -> t p :-> t q
- class BifunctorFunctor t => BifunctorMonad (t :: (k -> k1 -> Type) -> k -> k1 -> Type) where
  - bireturn :: forall (p :: k -> k1 -> Type). p :-> t p
  - bibind :: forall (p :: k -> k1 -> Type) (q :: k -> k1 -> Type). (p :-> t q) -> t p :-> t q
  - bijoin :: forall (p :: k -> k1 -> Type). t (t p) :-> t p
- biliftM :: forall {k1} {k2} (t :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) (p :: k1 -> k2 -> Type) (q :: k1 -> k2 -> Type). BifunctorMonad t => (p :-> q) -> t p :-> t q
- class BifunctorFunctor t => BifunctorComonad (t :: (k -> k1 -> Type) -> k -> k1 -> Type) where
  - biextract :: forall (p :: k -> k1 -> Type). t p :-> p
  - biextend :: forall (p :: k -> k1 -> Type) (q :: k -> k1 -> Type). (t p :-> q) -> t p :-> t q
  - biduplicate :: forall (p :: k -> k1 -> Type). t p :-> t (t p)
- biliftW :: forall {k1} {k2} (t :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) (p :: k1 -> k2 -> Type) (q :: k1 -> k2 -> Type). BifunctorComonad t => (p :-> q) -> t p :-> t q

# Documentation

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

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

class BifunctorFunctor (t :: (k -> k1 -> Type) -> k2 -> k3 -> Type) where #

Methods

bifmap :: forall (p :: k -> k1 -> Type) (q :: k -> k1 -> Type). (p :-> q) -> t p :-> t q #

#### Instances

Instances details

BifunctorFunctor (Flip :: (k3 -> k2 -> Type) -> k2 -> k3 -> Type) # |
Instance details Defined in Data.Bifunctor.Flip Methods bifmap :: forall (p :: k3 -> k2 -> Type) (q :: k3 -> k2 -> Type). (p :-> q) -> Flip p :-> Flip q #
BifunctorFunctor (Product p :: (k2 -> k3 -> Type) -> k2 -> k3 -> Type) # |
Instance details Defined in Data.Bifunctor.Product Methods bifmap :: forall (p0 :: k2 -> k3 -> Type) (q :: k2 -> k3 -> Type). (p0 :-> q) -> Product p p0 :-> Product p q #
BifunctorFunctor (Sum p :: (k2 -> k3 -> Type) -> k2 -> k3 -> Type) # |
Instance details Defined in Data.Bifunctor.Sum Methods bifmap :: forall (p0 :: k2 -> k3 -> Type) (q :: k2 -> k3 -> Type). (p0 :-> q) -> Sum p p0 :-> Sum p q #
Functor f => BifunctorFunctor (Tannen f :: (k2 -> k3 -> Type) -> k2 -> k3 -> Type) # |
Instance details Defined in Data.Bifunctor.Tannen Methods bifmap :: forall (p :: k2 -> k3 -> Type) (q :: k2 -> k3 -> Type). (p :-> q) -> Tannen f p :-> Tannen f q #

class BifunctorFunctor t => BifunctorMonad (t :: (k -> k1 -> Type) -> k -> k1 -> Type) where #

Minimal complete definition

bireturn, (bibind | bijoin)

Methods

bireturn :: forall (p :: k -> k1 -> Type). p :-> t p #

bibind :: forall (p :: k -> k1 -> Type) (q :: k -> k1 -> Type). (p :-> t q) -> t p :-> t q #

bijoin :: forall (p :: k -> k1 -> Type). t (t p) :-> t p #

#### Instances

Instances details

BifunctorMonad (Sum p :: (k -> k1 -> Type) -> k -> k1 -> Type) # |
Instance details Defined in Data.Bifunctor.Sum Methods bireturn :: forall (p0 :: k -> k1 -> Type). p0 :-> Sum p p0 # bibind :: forall (p0 :: k -> k1 -> Type) (q :: k -> k1 -> Type). (p0 :-> Sum p q) -> Sum p p0 :-> Sum p q # bijoin :: forall (p0 :: k -> k1 -> Type). Sum p (Sum p p0) :-> Sum p p0 #
(Functor f, Monad f) => BifunctorMonad (Tannen f :: (k -> k1 -> Type) -> k -> k1 -> Type) # |
Instance details Defined in Data.Bifunctor.Tannen Methods bireturn :: forall (p :: k -> k1 -> Type). p :-> Tannen f p # bibind :: forall (p :: k -> k1 -> Type) (q :: k -> k1 -> Type). (p :-> Tannen f q) -> Tannen f p :-> Tannen f q # bijoin :: forall (p :: k -> k1 -> Type). Tannen f (Tannen f p) :-> Tannen f p #

biliftM :: forall {k1} {k2} (t :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) (p :: k1 -> k2 -> Type) (q :: k1 -> k2 -> Type). BifunctorMonad t => (p :-> q) -> t p :-> t q #

class BifunctorFunctor t => BifunctorComonad (t :: (k -> k1 -> Type) -> k -> k1 -> Type) where #

Minimal complete definition

biextract, (biextend | biduplicate)

Methods

biextract :: forall (p :: k -> k1 -> Type). t p :-> p #

biextend :: forall (p :: k -> k1 -> Type) (q :: k -> k1 -> Type). (t p :-> q) -> t p :-> t q #

biduplicate :: forall (p :: k -> k1 -> Type). t p :-> t (t p) #

#### Instances

Instances details

BifunctorComonad (Product p :: (k -> k1 -> Type) -> k -> k1 -> Type) # |
Instance details Defined in Data.Bifunctor.Product Methods biextract :: forall (p0 :: k -> k1 -> Type). Product p p0 :-> p0 # biextend :: forall (p0 :: k -> k1 -> Type) (q :: k -> k1 -> Type). (Product p p0 :-> q) -> Product p p0 :-> Product p q # biduplicate :: forall (p0 :: k -> k1 -> Type). Product p p0 :-> Product p (Product p p0) #
Comonad f => BifunctorComonad (Tannen f :: (k -> k1 -> Type) -> k -> k1 -> Type) # |
Instance details Defined in Data.Bifunctor.Tannen Methods biextract :: forall (p :: k -> k1 -> Type). Tannen f p :-> p # biextend :: forall (p :: k -> k1 -> Type) (q :: k -> k1 -> Type). (Tannen f p :-> q) -> Tannen f p :-> Tannen f q # biduplicate :: forall (p :: k -> k1 -> Type). Tannen f p :-> Tannen f (Tannen f p) #

biliftW :: forall {k1} {k2} (t :: (k1 -> k2 -> Type) -> k1 -> k2 -> Type) (p :: k1 -> k2 -> Type) (q :: k1 -> k2 -> Type). BifunctorComonad t => (p :-> q) -> t p :-> t q #