Module

Control.Category.Tensor

#GBifunctor

#grmap

grmap :: forall p q r t a b b'. GBifunctor p q r t => q b b' -> r (t a b) (t a b')

#glmap

glmap :: forall p q r t a a' b. GBifunctor p q r t => p a a' -> r (t a b) (t a' b)

#Iso

type Iso p a b = { bwd :: p b a, fwd :: p a b }

#flipIso

flipIso :: forall a b. Iso Function a b -> Iso Op a b

#Associative

class (Category p, GBifunctor p p p t) <= Associative t p  where

Members

  • assoc :: forall a b c. Iso p (t a (t b c)) (t (t a b) c)

Instances

#Tensor

class (Associative t p) <= Tensor t i p | t -> i where

Members

Instances

#Symmetric

class (Associative t p) <= Symmetric t p  where

Members

  • swap :: forall a b. p (t a b) (t b a)

Instances

#Cartesian

class (Symmetric t p, Tensor t i p) <= Cartesian t i p | i -> t, t -> i where

Members

Instances

#dup

dup :: forall a. a -> a /\ a

#merge

merge :: forall a. a \/ a -> a

Modules