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

Proarrow.Category.Instance.Linear

Documentation

data LINEAR Source Comments #

Constructors

L Type 

Instances

Instances details
Monoidal LINEAR Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type Unit 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Unit = 'L ()
type ('L a :: LINEAR) ** ('L b :: LINEAR) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type ('L a :: LINEAR) ** ('L b :: LINEAR) = 'L (a, b)

Methods

par :: forall (a :: LINEAR) (b :: LINEAR) (c :: LINEAR) (d :: LINEAR). (a ~> b) -> (c ~> d) -> (a ** c) ~> (b ** d) Source Comments #

leftUnitor :: forall (a :: LINEAR). Obj a -> ((Unit :: LINEAR) ** a) ~> a Source Comments #

leftUnitorInv :: forall (a :: LINEAR). Obj a -> a ~> ((Unit :: LINEAR) ** a) Source Comments #

rightUnitor :: forall (a :: LINEAR). Obj a -> (a ** (Unit :: LINEAR)) ~> a Source Comments #

rightUnitorInv :: forall (a :: LINEAR). Obj a -> a ~> (a ** (Unit :: LINEAR)) Source Comments #

associator :: forall (a :: LINEAR) (b :: LINEAR) (c :: LINEAR). Obj a -> Obj b -> Obj c -> ((a ** b) ** c) ~> (a ** (b ** c)) Source Comments #

associatorInv :: forall (a :: LINEAR) (b :: LINEAR) (c :: LINEAR). Obj a -> Obj b -> Obj c -> (a ** (b ** c)) ~> ((a ** b) ** c) Source Comments #

SymMonoidal LINEAR Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

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

CategoryOf LINEAR Source Comments #

Category of linear functions.

Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type (~>) = Linear
type Ob (a :: LINEAR) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Ob (a :: LINEAR) = Is 'L a
HasBinaryCoproducts LINEAR Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type ('L a :: LINEAR) || ('L b :: LINEAR) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type ('L a :: LINEAR) || ('L b :: LINEAR) = 'L (Either a b)

Methods

lft' :: forall (a :: LINEAR) (b :: LINEAR). Obj a -> Obj b -> a ~> (a || b) Source Comments #

rgt' :: forall (a :: LINEAR) (b :: LINEAR). Obj a -> Obj b -> b ~> (a || b) Source Comments #

(|||) :: forall (x :: LINEAR) (a :: LINEAR) (y :: LINEAR). (x ~> a) -> (y ~> a) -> (x || y) ~> a Source Comments #

(+++) :: forall (a :: LINEAR) (b :: LINEAR) (x :: LINEAR) (y :: LINEAR). (a ~> x) -> (b ~> y) -> (a || b) ~> (x || y) Source Comments #

Closed LINEAR Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type (a :: LINEAR) ~~> (b :: LINEAR) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type (a :: LINEAR) ~~> (b :: LINEAR) = 'L (UN 'L a %1 -> UN 'L b)

Methods

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

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

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

HasInitialObject LINEAR Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type InitialObject 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

initiate' :: forall (a :: LINEAR). Obj a -> (InitialObject :: LINEAR) ~> a Source Comments #

Promonad Linear Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

id :: forall (a :: LINEAR). Ob a => Linear a a Source Comments #

(.) :: forall (b :: LINEAR) (c :: LINEAR) (a :: LINEAR). Linear b c -> Linear a b -> Linear a c Source Comments #

MonoidalProfunctor Forget Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

lift0 :: Forget (Unit :: LINEAR) (Unit :: Type) Source Comments #

lift2 :: forall (x1 :: LINEAR) x2 (y1 :: LINEAR) y2. Forget x1 x2 -> Forget y1 y2 -> Forget (x1 ** y1) (x2 ** y2) Source Comments #

MonoidalProfunctor Free Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

lift0 :: Free (Unit :: Type) (Unit :: LINEAR) Source Comments #

lift2 :: forall x1 (x2 :: LINEAR) y1 (y2 :: LINEAR). Free x1 x2 -> Free y1 y2 -> Free (x1 ** y1) (x2 ** y2) Source Comments #

Profunctor Linear Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

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

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

Profunctor Forget Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

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

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

Profunctor Free Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

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

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

Corepresentable Forget Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type Forget %% (a :: LINEAR) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Forget %% (a :: LINEAR) = UN 'L a

Methods

coindex :: forall (a :: LINEAR) b. Forget a b -> (Forget %% a) ~> b Source Comments #

cotabulate :: forall (a :: LINEAR) b. Ob a => ((Forget %% a) ~> b) -> Forget a b Source Comments #

corepMap :: forall (a :: LINEAR) (b :: LINEAR). (a ~> b) -> (Forget %% a) ~> (Forget %% b) Source Comments #

Corepresentable Free Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type Free %% (a :: Type) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Free %% (a :: Type) = 'L (Ur a)

Methods

coindex :: forall a (b :: LINEAR). Free a b -> (Free %% a) ~> b Source Comments #

cotabulate :: forall a (b :: LINEAR). Ob a => ((Free %% a) ~> b) -> Free a b Source Comments #

corepMap :: (a ~> b) -> (Free %% a) ~> (Free %% b) Source Comments #

Adjunction Free Forget Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

unit :: forall (a :: LINEAR). Ob a => (Forget :.: Free) a a Source Comments #

counit :: (Free :.: Forget) :~> ((~>) :: CAT Type) Source Comments #

type Unit Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

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

Defined in Proarrow.Category.Instance.Linear

type (~>) = Linear
type InitialObject Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Ob (a :: LINEAR) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Ob (a :: LINEAR) = Is 'L a
type (a :: LINEAR) ~~> (b :: LINEAR) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

type (a :: LINEAR) ~~> (b :: LINEAR) = 'L (UN 'L a %1 -> UN 'L b)
type Forget %% (a :: LINEAR) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Forget %% (a :: LINEAR) = UN 'L a
type Free %% (a :: Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Free %% (a :: Type) = 'L (Ur a)
type UN 'L ('L a :: LINEAR) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

type UN 'L ('L a :: LINEAR) = a
type ('L a :: LINEAR) ** ('L b :: LINEAR) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

type ('L a :: LINEAR) ** ('L b :: LINEAR) = 'L (a, b)
type ('L a :: LINEAR) || ('L b :: LINEAR) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

type ('L a :: LINEAR) || ('L b :: LINEAR) = 'L (Either a b)

data Linear (a :: LINEAR) (b :: LINEAR) where Source Comments #

Constructors

Linear :: forall a1 b1. (a1 %1 -> b1) -> Linear ('L a1) ('L b1) 

Instances

Instances details
Promonad Linear Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

id :: forall (a :: LINEAR). Ob a => Linear a a Source Comments #

(.) :: forall (b :: LINEAR) (c :: LINEAR) (a :: LINEAR). Linear b c -> Linear a b -> Linear a c Source Comments #

Profunctor Linear Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

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

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

data Forget (a :: LINEAR) b where Source Comments #

Constructors

Forget :: forall a1 b. (a1 -> b) -> Forget ('L a1) b 

Instances

Instances details
MonoidalProfunctor Forget Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

lift0 :: Forget (Unit :: LINEAR) (Unit :: Type) Source Comments #

lift2 :: forall (x1 :: LINEAR) x2 (y1 :: LINEAR) y2. Forget x1 x2 -> Forget y1 y2 -> Forget (x1 ** y1) (x2 ** y2) Source Comments #

Profunctor Forget Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

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

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

Corepresentable Forget Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type Forget %% (a :: LINEAR) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Forget %% (a :: LINEAR) = UN 'L a

Methods

coindex :: forall (a :: LINEAR) b. Forget a b -> (Forget %% a) ~> b Source Comments #

cotabulate :: forall (a :: LINEAR) b. Ob a => ((Forget %% a) ~> b) -> Forget a b Source Comments #

corepMap :: forall (a :: LINEAR) (b :: LINEAR). (a ~> b) -> (Forget %% a) ~> (Forget %% b) Source Comments #

Adjunction Free Forget Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

unit :: forall (a :: LINEAR). Ob a => (Forget :.: Free) a a Source Comments #

counit :: (Free :.: Forget) :~> ((~>) :: CAT Type) Source Comments #

type Forget %% (a :: LINEAR) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Forget %% (a :: LINEAR) = UN 'L a

data Ur a where Source Comments #

Constructors

Ur :: forall a. a -> Ur a 

Instances

Instances details
Functor Ur Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

map :: (a ~> b) -> Ur a ~> Ur b Source Comments #

unur :: Ur a %1 -> a Source Comments #

data Free a (b :: LINEAR) where Source Comments #

Constructors

Free :: forall a b1. (Ur a %1 -> b1) -> Free a ('L b1) 

Instances

Instances details
MonoidalProfunctor Free Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

lift0 :: Free (Unit :: Type) (Unit :: LINEAR) Source Comments #

lift2 :: forall x1 (x2 :: LINEAR) y1 (y2 :: LINEAR). Free x1 x2 -> Free y1 y2 -> Free (x1 ** y1) (x2 ** y2) Source Comments #

Profunctor Free Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

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

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

Corepresentable Free Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type Free %% (a :: Type) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Free %% (a :: Type) = 'L (Ur a)

Methods

coindex :: forall a (b :: LINEAR). Free a b -> (Free %% a) ~> b Source Comments #

cotabulate :: forall a (b :: LINEAR). Ob a => ((Free %% a) ~> b) -> Free a b Source Comments #

corepMap :: (a ~> b) -> (Free %% a) ~> (Free %% b) Source Comments #

Adjunction Free Forget Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

unit :: forall (a :: LINEAR). Ob a => (Forget :.: Free) a a Source Comments #

counit :: (Free :.: Forget) :~> ((~>) :: CAT Type) Source Comments #

type Free %% (a :: Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Linear

type Free %% (a :: Type) = 'L (Ur a)

unlift2Forget :: forall (x :: LINEAR) (y :: LINEAR). (Ob x, Ob y) => (Forget %% (x ** y)) ~> ((Forget %% x) ** (Forget %% y)) Source Comments #