category-extras-0.44.1: Various modules and constructs inspired by category theory.

Portabilityportable
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Bifunctor.Composition

Description

 

Documentation

newtype ArrowB f g a b Source

Constructors

ArrowB 

Fields

runArrowB :: f a b -> g a b
 

newtype ConstB t a b Source

Constructors

ConstB 

Fields

runConstB :: t
 

Instances

newtype FstB a b Source

Constructors

FstB 

Fields

runFstB :: a
 

newtype SndB a b Source

Constructors

SndB 

Fields

runSndB :: b
 

Instances

newtype CompB p f g a b Source

Constructors

CompB 

Fields

runCompB :: p (f a b) (g a b)
 

Instances

(Bifunctor p, Bifunctor f, Bifunctor g) => Bifunctor (CompB p f g) 
(Bifunctor p, Symmetric f, Symmetric g) => Symmetric (CompB p f g) 
(Bifunctor p, Braided f, Braided g) => Braided (CompB p f g) 
(Bifunctor p, Bifunctor f, Bifunctor g) => Functor (CompB p f g a) 

liftCompB :: Bifunctor p => (f a b -> f c d) -> (g a b -> g c d) -> CompB p f g a b -> CompB p f g c dSource

newtype SwapB p a b Source

Constructors

SwapB 

Fields

runSwapB :: p b a
 

Instances

liftSwapB :: Bifunctor p => (p a b -> p c d) -> SwapB p b a -> SwapB p d cSource

newtype FunctorB f p a b Source

Constructors

FunctorB 

Fields

runFunctorB :: f (p a b)
 

Instances

(Functor f, Bifunctor p) => Bifunctor (FunctorB f p) 
(Functor f, Symmetric p) => Symmetric (FunctorB f p) 
(Functor f, Braided p) => Braided (FunctorB f p) 
(Zip f, Bizip p) => Bizip (FunctorB f p) 
(Functor f, Bifunctor p) => Functor (FunctorB f p a) 

liftFunctorB :: Functor f => (p a b -> p c d) -> FunctorB f p a b -> FunctorB f p c dSource

newtype BiffB p f g a b Source

Constructors

BiffB 

Fields

runBiffB :: p (f a) (g b)
 

Instances

(Functor f, Bifunctor p, Functor g) => Bifunctor (BiffB p f g) 
(Functor f, Symmetric p) => Symmetric (BiffB p f f) 
(Functor f, Braided p) => Braided (BiffB p f f) 
Functor f => PComonad (BiffB (,) Identity f) 
Functor f => PMonad (BiffB Either Identity f) 
FunctorPlus f => PMonad (BiffB (,) Identity f) 
(Bizip p, Zip f, Zip g) => Bizip (BiffB p f g) 
(BiZap p q, Zap f g, Zap i j) => BiZap (BiffB p f i) (BiffB q g j) 
(Functor f, Bifunctor p, Functor g) => Functor (BiffB p f g a)