monoidal-functors-0.1.1.0: Monoidal Functors Library
Safe HaskellNone
LanguageHaskell2010

Control.Category.Tensor

Documentation

class (Category cat1, Category cat2) => GBifunctor cat1 cat2 r t | t r -> cat1 cat2 where Source #

Methods

gbimap :: (a `cat1` b) -> (c `cat2` d) -> t a c `r` t b d Source #

Instances

Instances details
GBifunctor ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) t => GBifunctor Op Op Op t Source # 
Instance details

Defined in Control.Category.Tensor

Methods

gbimap :: Op a b -> Op c d -> Op (t a c) (t b d) Source #

GBifunctor ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Either Source # 
Instance details

Defined in Control.Category.Tensor

Methods

gbimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source #

GBifunctor ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) (,) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

gbimap :: (a -> b) -> (c -> d) -> (a, c) -> (b, d) Source #

GBifunctor ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) These Source # 
Instance details

Defined in Control.Category.Tensor

Methods

gbimap :: (a -> b) -> (c -> d) -> These a c -> These b d Source #

GBifunctor (Star Maybe) (Star Maybe) (Star Maybe) These Source # 
Instance details

Defined in Control.Category.Tensor

Methods

gbimap :: Star Maybe a b -> Star Maybe c d -> Star Maybe (These a c) (These b d) Source #

grmap :: GBifunctor cat1 cat2 r t => (c `cat2` d) -> t a c `r` t a d Source #

glmap :: GBifunctor cat1 cat2 r t => (a `cat1` b) -> t a c `r` t b c Source #

data Iso cat a b Source #

Constructors

Iso 

Fields

  • fwd :: a `cat` b
     
  • bwd :: b `cat` a
     

class (Category cat, GBifunctor cat cat cat t) => Associative t cat where Source #

Methods

assoc :: Iso cat (a `t` (b `t` c)) ((a `t` b) `t` c) Source #

Instances

Instances details
Associative t ((->) :: Type -> Type -> Type) => Associative t Op Source # 
Instance details

Defined in Control.Category.Tensor

Methods

assoc :: Iso Op (t a (t b c)) (t (t a b) c) Source #

Associative Either ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

assoc :: Iso (->) (Either a (Either b c)) (Either (Either a b) c) Source #

Associative (,) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

assoc :: Iso (->) (a, (b, c)) ((a, b), c) Source #

(Monad m, Associative t ((->) :: Type -> Type -> Type), GBifunctor (Star m) (Star m) (Star m) t) => Associative t (Star m) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

assoc :: Iso (Star m) (t a (t b c)) (t (t a b) c) Source #

Associative These ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

assoc :: Iso (->) (These a (These b c)) (These (These a b) c) Source #

class Associative t cat => Tensor t i cat | t -> i where Source #

Methods

lunit :: Iso cat (t i a) a Source #

runit :: Iso cat (t a i) a Source #

Instances

Instances details
Tensor t i ((->) :: Type -> Type -> Type) => Tensor t i Op Source # 
Instance details

Defined in Control.Category.Tensor

Methods

lunit :: Iso Op (t i a) a Source #

runit :: Iso Op (t a i) a Source #

Tensor Either Void ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

lunit :: Iso (->) (Either Void a) a Source #

runit :: Iso (->) (Either a Void) a Source #

Tensor (,) () ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

lunit :: Iso (->) ((), a) a Source #

runit :: Iso (->) (a, ()) a Source #

(Monad m, Tensor t i ((->) :: Type -> Type -> Type), Associative t (Star m)) => Tensor t i (Star m) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

lunit :: Iso (Star m) (t i a) a Source #

runit :: Iso (Star m) (t a i) a Source #

Tensor These Void ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

lunit :: Iso (->) (These Void a) a Source #

runit :: Iso (->) (These a Void) a Source #

class Associative t cat => Symmetric t cat where Source #

Methods

swap :: t a b `cat` t b a Source #

Instances

Instances details
Symmetric t ((->) :: Type -> Type -> Type) => Symmetric t Op Source # 
Instance details

Defined in Control.Category.Tensor

Methods

swap :: Op (t a b) (t b a) Source #

Symmetric Either ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

swap :: Either a b -> Either b a Source #

Symmetric (,) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

swap :: (a, b) -> (b, a) Source #

(Monad m, Symmetric t ((->) :: Type -> Type -> Type), Associative t (Star m)) => Symmetric t (Star m) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

swap :: Star m (t a b) (t b a) Source #

Symmetric These ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

swap :: These a b -> These b a Source #

class (Symmetric t cat, Tensor t i cat) => Cartesian t i cat | i -> t, t -> i where Source #

Methods

diagonal :: a `cat` t a a Source #

terminal :: a `cat` i Source #

Instances

Instances details
Cartesian Either Void Op Source # 
Instance details

Defined in Control.Category.Tensor

Methods

diagonal :: Op a (Either a a) Source #

terminal :: Op a Void Source #

Cartesian (,) () ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Tensor

Methods

diagonal :: a -> (a, a) Source #

terminal :: a -> () Source #

dup :: a -> (a, a) Source #

merge :: Either a a -> a Source #