proarrow-0: Category theory with a central role for profunctors
Safe HaskellNone
LanguageHaskell2010

Proarrow.Category.Instance.Cat

Documentation

newtype KIND Source Comments #

Constructors

K Kind 

Instances

Instances details
Monoidal KIND Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Associated Types

type Unit 
Instance details

Defined in Proarrow.Category.Instance.Cat

type Unit = 'K ()
type (l :: KIND) ** (r :: KIND) 
Instance details

Defined in Proarrow.Category.Instance.Cat

type (l :: KIND) ** (r :: KIND) = 'K (UN 'K l, UN 'K r)

Methods

leftUnitor :: forall (a :: KIND). Ob a => ((Unit :: KIND) ** a) ~> a Source Comments #

leftUnitorInv :: forall (a :: KIND). Ob a => a ~> ((Unit :: KIND) ** a) Source Comments #

rightUnitor :: forall (a :: KIND). Ob a => (a ** (Unit :: KIND)) ~> a Source Comments #

rightUnitorInv :: forall (a :: KIND). Ob a => a ~> (a ** (Unit :: KIND)) Source Comments #

associator :: forall (a :: KIND) (b :: KIND) (c :: KIND). (Ob a, Ob b, Ob c) => ((a ** b) ** c) ~> (a ** (b ** c)) Source Comments #

associatorInv :: forall (a :: KIND) (b :: KIND) (c :: KIND). (Ob a, Ob b, Ob c) => (a ** (b ** c)) ~> ((a ** b) ** c) Source Comments #

SymMonoidal KIND Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

swap' :: forall (a :: KIND) (a' :: KIND) (b :: KIND) (b' :: KIND). (a ~> a') -> (b ~> b') -> (a ** b) ~> (b' ** a') Source Comments #

CategoryOf KIND Source Comments #

The category of categories and profunctors between them.

Instance details

Defined in Proarrow.Category.Instance.Cat

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Cat

type (~>) = Cat
type Ob (c :: KIND) 
Instance details

Defined in Proarrow.Category.Instance.Cat

type Ob (c :: KIND) = (Is 'K c, CategoryOf (UN 'K c))
HasBinaryProducts KIND Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Associated Types

type (l :: KIND) && (r :: KIND) 
Instance details

Defined in Proarrow.Category.Instance.Cat

type (l :: KIND) && (r :: KIND) = 'K (UN 'K l, UN 'K r)

Methods

fst :: forall (a :: KIND) (b :: KIND). (Ob a, Ob b) => (a && b) ~> a Source Comments #

fst' :: forall (a :: KIND) (a' :: KIND) (b :: KIND). (a ~> a') -> Obj b -> (a && b) ~> a' Source Comments #

snd :: forall (a :: KIND) (b :: KIND). (Ob a, Ob b) => (a && b) ~> b Source Comments #

snd' :: forall (a :: KIND) (b :: KIND) (b' :: KIND). Obj a -> (b ~> b') -> (a && b) ~> b' Source Comments #

(&&&) :: forall (a :: KIND) (x :: KIND) (y :: KIND). (a ~> x) -> (a ~> y) -> a ~> (x && y) Source Comments #

(***) :: forall (a :: KIND) (b :: KIND) (x :: KIND) (y :: KIND). (a ~> x) -> (b ~> y) -> (a && b) ~> (x && y) Source Comments #

CompactClosed KIND Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

distribDual :: forall (a :: KIND) (b :: KIND). (Ob a, Ob b) => Dual (a ** b) ~> (Dual a ** Dual b) Source Comments #

distribDual' :: forall (a :: KIND) (a' :: KIND) (b :: KIND) (b' :: KIND). (a ~> a') -> (b ~> b') -> Dual (a' ** b') ~> (Dual a ** Dual b) Source Comments #

StarAutonomous KIND Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Associated Types

type Bottom 
Instance details

Defined in Proarrow.Category.Instance.Cat

type Bottom = 'K ()

Methods

bottomObj :: Obj (Bottom :: KIND) Source Comments #

doubleNeg :: forall (a :: KIND). (StarAutonomous KIND, Ob a) => Dual (Dual a) ~> a Source Comments #

doubleNeg' :: forall (a :: KIND) (a' :: KIND). (a ~> a') -> Dual (Dual a) ~> a' Source Comments #

Closed KIND Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Associated Types

type ('K a :: KIND) ~~> ('K b :: KIND) 
Instance details

Defined in Proarrow.Category.Instance.Cat

type ('K a :: KIND) ~~> ('K b :: KIND) = 'K (b, OPPOSITE a)

Methods

curry' :: forall (a :: KIND) (b :: KIND) (c :: KIND). Obj a -> Obj b -> ((a ** b) ~> c) -> a ~> (b ~~> c) Source Comments #

uncurry' :: forall (b :: KIND) (c :: KIND) (a :: KIND). Obj b -> Obj c -> (a ~> (b ~~> c)) -> (a ** b) ~> c Source Comments #

(^^^) :: forall (b :: KIND) (y :: KIND) (x :: KIND) (a :: KIND). (b ~> y) -> (x ~> a) -> (a ~~> b) ~> (x ~~> y) Source Comments #

HasTerminalObject KIND Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Associated Types

type TerminalObject 
Instance details

Defined in Proarrow.Category.Instance.Cat

type TerminalObject = 'K ()

Methods

terminate :: forall (a :: KIND). Ob a => a ~> (TerminalObject :: KIND) Source Comments #

terminate' :: forall (a :: KIND) (a' :: KIND). (a ~> a') -> a ~> (TerminalObject :: KIND) Source Comments #

TracedMonoidalProfunctor Cat Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

trace :: forall (u :: KIND) (x :: KIND) (y :: KIND). (Ob x, Ob y, Ob u) => Cat (x ** u) (y ** u) -> Cat x y Source Comments #

trace' :: forall (x :: KIND) (x' :: KIND) (y :: KIND) (y' :: KIND) (u :: KIND) (u' :: KIND). (x ~> x') -> (y ~> y') -> (u ~> u') -> Cat (x' ** u') (y ** u) -> Cat x y' Source Comments #

Promonad Cat Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

id :: forall (a :: KIND). Ob a => Cat a a Source Comments #

(.) :: forall (b :: KIND) (c :: KIND) (a :: KIND). Cat b c -> Cat a b -> Cat a c Source Comments #

MonoidalProfunctor Cat Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

par0 :: Cat (Unit :: KIND) (Unit :: KIND) Source Comments #

par :: forall (x1 :: KIND) (x2 :: KIND) (y1 :: KIND) (y2 :: KIND). Cat x1 x2 -> Cat y1 y2 -> Cat (x1 ** y1) (x2 ** y2) Source Comments #

Profunctor Cat Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

dimap :: forall (c :: KIND) (a :: KIND) (b :: KIND) (d :: KIND). (c ~> a) -> (b ~> d) -> Cat a b -> Cat c d Source Comments #

(\\) :: forall (a :: KIND) (b :: KIND) r. ((Ob a, Ob b) => r) -> Cat a b -> r Source Comments #

type Unit Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

type Unit = 'K ()
type (~>) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

type (~>) = Cat
type Bottom Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

type Bottom = 'K ()
type TerminalObject Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

type TerminalObject = 'K ()
type Ob (c :: KIND) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

type Ob (c :: KIND) = (Is 'K c, CategoryOf (UN 'K c))
type (l :: KIND) ** (r :: KIND) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

type (l :: KIND) ** (r :: KIND) = 'K (UN 'K l, UN 'K r)
type (l :: KIND) && (r :: KIND) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

type (l :: KIND) && (r :: KIND) = 'K (UN 'K l, UN 'K r)
type UN 'K ('K k :: KIND) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

type UN 'K ('K k :: KIND) = k
type ('K a :: KIND) ~~> ('K b :: KIND) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

type ('K a :: KIND) ~~> ('K b :: KIND) = 'K (b, OPPOSITE a)

data Cat (a :: KIND) (b :: KIND) where Source Comments #

Constructors

Cat :: forall {j} {k} (p :: j +-> k). Profunctor p => Cat ('K j) ('K k) 

Instances

Instances details
TracedMonoidalProfunctor Cat Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

trace :: forall (u :: KIND) (x :: KIND) (y :: KIND). (Ob x, Ob y, Ob u) => Cat (x ** u) (y ** u) -> Cat x y Source Comments #

trace' :: forall (x :: KIND) (x' :: KIND) (y :: KIND) (y' :: KIND) (u :: KIND) (u' :: KIND). (x ~> x') -> (y ~> y') -> (u ~> u') -> Cat (x' ** u') (y ** u) -> Cat x y' Source Comments #

Promonad Cat Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

id :: forall (a :: KIND). Ob a => Cat a a Source Comments #

(.) :: forall (b :: KIND) (c :: KIND) (a :: KIND). Cat b c -> Cat a b -> Cat a c Source Comments #

MonoidalProfunctor Cat Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

par0 :: Cat (Unit :: KIND) (Unit :: KIND) Source Comments #

par :: forall (x1 :: KIND) (x2 :: KIND) (y1 :: KIND) (y2 :: KIND). Cat x1 x2 -> Cat y1 y2 -> Cat (x1 ** y1) (x2 ** y2) Source Comments #

Profunctor Cat Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

dimap :: forall (c :: KIND) (a :: KIND) (b :: KIND) (d :: KIND). (c ~> a) -> (b ~> d) -> Cat a b -> Cat c d Source Comments #

(\\) :: forall (a :: KIND) (b :: KIND) r. ((Ob a, Ob b) => r) -> Cat a b -> r Source Comments #

data Terminate (a :: ()) (b :: k) where Source Comments #

Constructors

Terminate :: forall {k} (b :: k). Ob b => Terminate '() b 

Instances

Instances details
CategoryOf k => Profunctor (Terminate :: () -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

dimap :: forall (c :: ()) (a :: ()) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> Terminate a b -> Terminate c d Source Comments #

(\\) :: forall (a :: ()) (b :: k) r. ((Ob a, Ob b) => r) -> Terminate a b -> r Source Comments #

data FstCat (a :: j) (b :: (j, k)) where Source Comments #

Constructors

FstCat :: forall {k} {j} (c :: k) (a :: j) (b1 :: j). Ob c => (a ~> b1) -> FstCat a '(b1, c) 

Instances

Instances details
(CategoryOf j, CategoryOf k) => Profunctor (FstCat :: j -> (j, k) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

dimap :: forall (c :: j) (a :: j) (b :: (j, k)) (d :: (j, k)). (c ~> a) -> (b ~> d) -> FstCat a b -> FstCat c d Source Comments #

(\\) :: forall (a :: j) (b :: (j, k)) r. ((Ob a, Ob b) => r) -> FstCat a b -> r Source Comments #

data SndCat (a :: k) (b :: (j, k)) where Source Comments #

Constructors

SndCat :: forall {j} {k} (b1 :: j) (a :: k) (c :: k). Ob b1 => (a ~> c) -> SndCat a '(b1, c) 

Instances

Instances details
(CategoryOf j, CategoryOf k) => Profunctor (SndCat :: k -> (j, k) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

dimap :: forall (c :: k) (a :: k) (b :: (j, k)) (d :: (j, k)). (c ~> a) -> (b ~> d) -> SndCat a b -> SndCat c d Source Comments #

(\\) :: forall (a :: k) (b :: (j, k)) r. ((Ob a, Ob b) => r) -> SndCat a b -> r Source Comments #

data ((p :: k +-> i) :&&&: (q :: k +-> j)) (a :: (i, j)) (b :: k) where Source Comments #

Constructors

(:&&&:) :: forall {k} {i} {j} (p :: k +-> i) (a1 :: i) (b :: k) (q :: k +-> j) (b1 :: j). p a1 b -> q b1 b -> (p :&&&: q) '(a1, b1) b 

Instances

Instances details
(Profunctor p, Profunctor q) => Profunctor (p :&&&: q :: (i, j) -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

dimap :: forall (c :: (i, j)) (a :: (i, j)) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> (p :&&&: q) a b -> (p :&&&: q) c d Source Comments #

(\\) :: forall (a :: (i, j)) (b :: k) r. ((Ob a, Ob b) => r) -> (p :&&&: q) a b -> r Source Comments #

data Swap (p :: h +-> i) (q :: j +-> k) (a :: (k, i)) (b :: (h, j)) where Source Comments #

Constructors

Swap :: forall {h} {i} (p :: h +-> i) (a1 :: i) (b1 :: h) (q1 :: h +-> i) (c :: i) (d :: h). p a1 b1 -> q1 c d -> Swap p q1 '(a1, c) '(d, b1) 

Instances

Instances details
(Profunctor p, Profunctor q) => Profunctor (Swap p q :: (k, i) -> (h, j) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

dimap :: forall (c :: (k, i)) (a :: (k, i)) (b :: (h, j)) (d :: (h, j)). (c ~> a) -> (b ~> d) -> Swap p q a b -> Swap p q c d Source Comments #

(\\) :: forall (a :: (k, i)) (b :: (h, j)) r. ((Ob a, Ob b) => r) -> Swap p q a b -> r Source Comments #

data Curry (p :: (i, j) +-> k) (a :: (k, OPPOSITE j)) (b :: i) where Source Comments #

Constructors

Curry :: forall {i} {j} {k} (p :: (i, j) +-> k) (c :: k) (b :: i) (b1 :: j). p c '(b, b1) -> Curry p '(c, 'OP b1) b 

Instances

Instances details
(Profunctor p, CategoryOf i, CategoryOf j) => Profunctor (Curry p :: (k, OPPOSITE j) -> i -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

dimap :: forall (c :: (k, OPPOSITE j)) (a :: (k, OPPOSITE j)) (b :: i) (d :: i). (c ~> a) -> (b ~> d) -> Curry p a b -> Curry p c d Source Comments #

(\\) :: forall (a :: (k, OPPOSITE j)) (b :: i) r. ((Ob a, Ob b) => r) -> Curry p a b -> r Source Comments #

data Uncurry (p :: i +-> (k, OPPOSITE j)) (a :: k) (b :: (i, j)) where Source Comments #

Constructors

Uncurry :: forall {i} {k} {j} (p :: i +-> (k, OPPOSITE j)) (a :: k) (b1 :: j) (a1 :: i). p '(a, 'OP b1) a1 -> Uncurry p a '(a1, b1) 

Instances

Instances details
(Profunctor p, CategoryOf j, CategoryOf k) => Profunctor (Uncurry p :: k -> (i, j) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

dimap :: forall (c :: k) (a :: k) (b :: (i, j)) (d :: (i, j)). (c ~> a) -> (b ~> d) -> Uncurry p a b -> Uncurry p c d Source Comments #

(\\) :: forall (a :: k) (b :: (i, j)) r. ((Ob a, Ob b) => r) -> Uncurry p a b -> r Source Comments #

type DUAL k = ((), OPPOSITE k) Source Comments #

type Dual (a :: k) = '('(), 'OP a) Source Comments #

data DoubleNeg (a :: k) (b :: DUAL (DUAL k)) where Source Comments #

Constructors

DoubleNeg :: forall {k} (a :: k) (b1 :: k). (a ~> b1) -> DoubleNeg a '('(), 'OP (Dual b1)) 

Instances

Instances details
CategoryOf k => Profunctor (DoubleNeg :: k -> DUAL (DUAL k) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

dimap :: forall (c :: k) (a :: k) (b :: DUAL (DUAL k)) (d :: DUAL (DUAL k)). (c ~> a) -> (b ~> d) -> DoubleNeg a b -> DoubleNeg c d Source Comments #

(\\) :: forall (a :: k) (b :: DUAL (DUAL k)) r. ((Ob a, Ob b) => r) -> DoubleNeg a b -> r Source Comments #

data DistribDual (p :: j +-> j') (q :: k +-> k') (a :: (DUAL j, DUAL k)) (b :: DUAL (j', k')) where Source Comments #

Constructors

DistribDual :: forall {j} {j'} {k} {k'} (p :: j +-> j') (c :: j') (a1 :: j) (q :: k +-> k') (d :: k') (b1 :: k). p c a1 -> q d b1 -> DistribDual p q '(Dual a1, Dual b1) '('(), 'OP '(c, d)) 

Instances

Instances details
(Profunctor p, Profunctor q) => Profunctor (DistribDual p q :: (DUAL j, DUAL k) -> DUAL (j', k') -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Cat

Methods

dimap :: forall (c :: (DUAL j, DUAL k)) (a :: (DUAL j, DUAL k)) (b :: DUAL (j', k')) (d :: DUAL (j', k')). (c ~> a) -> (b ~> d) -> DistribDual p q a b -> DistribDual p q c d Source Comments #

(\\) :: forall (a :: (DUAL j, DUAL k)) (b :: DUAL (j', k')) r. ((Ob a, Ob b) => r) -> DistribDual p q a b -> r Source Comments #