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

Proarrow.Object.BinaryCoproduct

Documentation

class CategoryOf k => HasBinaryCoproducts k where Source Comments #

Minimal complete definition

lft', rgt', (|||)

Associated Types

type (a :: k) || (b :: k) :: k Source Comments #

Methods

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

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

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

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

Instances

Instances details
HasBinaryCoproducts BOOL Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Bool

Associated Types

type 'TRU || 'TRU 
Instance details

Defined in Proarrow.Category.Instance.Bool

type 'TRU || 'TRU = 'TRU
type 'TRU || 'FLS 
Instance details

Defined in Proarrow.Category.Instance.Bool

type 'TRU || 'FLS = 'TRU
type 'FLS || 'TRU 
Instance details

Defined in Proarrow.Category.Instance.Bool

type 'FLS || 'TRU = 'TRU
type 'FLS || 'FLS 
Instance details

Defined in Proarrow.Category.Instance.Bool

type 'FLS || 'FLS = 'FLS

Methods

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

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

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

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

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 #

HasBinaryCoproducts UNIT Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Associated Types

type 'U || 'U 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

type 'U || 'U = 'U

Methods

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

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

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

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

HasBinaryCoproducts Type Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Associated Types

type (a :: Type) || (b :: Type) 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

type (a :: Type) || (b :: Type) = Either a b

Methods

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

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

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

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

HasBinaryProducts k => HasBinaryCoproducts (OPPOSITE k) Source Comments # 
Instance details

Defined in Proarrow.Category.Opposite

Methods

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

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

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

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

(CategoryOf j, CategoryOf k) => HasBinaryCoproducts (PRO j k) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Methods

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

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

(|||) :: forall (x :: PRO j k) (a :: PRO j k) (y :: PRO j k). (x ~> a) -> (y ~> a) -> (x || y) ~> a Source Comments #

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

lft :: forall {k} (a :: k) (b :: k). (HasBinaryCoproducts k, Ob a, Ob b) => a ~> (a || b) Source Comments #

rgt :: forall {k} (a :: k) (b :: k). (HasBinaryCoproducts k, Ob a, Ob b) => b ~> (a || b) Source Comments #

left :: forall {k} (c :: k) (a :: k) (b :: k). (HasBinaryCoproducts k, Ob c) => (a ~> b) -> (a || c) ~> (b || c) Source Comments #

right :: forall {k} (c :: k) (a :: k) (b :: k). (HasBinaryCoproducts k, Ob c) => (a ~> b) -> (c || a) ~> (c || b) Source Comments #

newtype COPROD k Source Comments #

Constructors

COPR k 

Instances

Instances details
Tambara (->) (Previewing a b :: COPROD Type -> COPROD Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

tambara :: forall x x' (a0 :: COPROD Type) (b0 :: COPROD Type). (x -> x') -> Previewing a b a0 b0 -> Previewing a b (Act x a0) (Act x' b0) Source Comments #

MonoidalAction Type (COPROD Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Associated Types

type Act (p :: Type) ('COPR x :: COPROD Type) 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type Act (p :: Type) ('COPR x :: COPROD Type) = 'COPR (p ** x)

Methods

act :: forall p q (x :: COPROD Type) (y :: COPROD Type). (p ~> q) -> (x ~> y) -> Act p x ~> Act q y Source Comments #

unitor :: forall (x :: COPROD Type). Obj x -> Act (Unit :: Type) x ~> x Source Comments #

unitorInv :: forall (x :: COPROD Type). Obj x -> x ~> Act (Unit :: Type) x Source Comments #

multiplicator :: forall p q (x :: COPROD Type). Obj p -> Obj q -> Obj x -> Act p (Act q x) ~> Act (p ** q) x Source Comments #

multiplicatorInv :: forall p q (x :: COPROD Type). Obj p -> Obj q -> Obj x -> Act (p ** q) x ~> Act p (Act q x) Source Comments #

HasCoproducts k => Monoidal (COPROD k) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Associated Types

type Unit 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

type Unit = 'COPR (InitialObject :: k)

Methods

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

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

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

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

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

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

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

HasCoproducts k => SymMonoidal (COPROD k) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Methods

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

CategoryOf k => CategoryOf (COPROD k) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

type (~>) = Coprod :: COPROD k -> COPROD k -> Type
MonoidalAction (COPROD Type) Type Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Associated Types

type Act (p :: COPROD Type) (x :: Type) 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type Act (p :: COPROD Type) (x :: Type) = UN ('COPR :: Type -> COPROD Type) (p ** 'COPR x)

Methods

act :: forall (p :: COPROD Type) (q :: COPROD Type) x y. (p ~> q) -> (x ~> y) -> Act p x ~> Act q y Source Comments #

unitor :: Obj x -> Act (Unit :: COPROD Type) x ~> x Source Comments #

unitorInv :: Obj x -> x ~> Act (Unit :: COPROD Type) x Source Comments #

multiplicator :: forall (p :: COPROD Type) (q :: COPROD Type) x. Obj p -> Obj q -> Obj x -> Act p (Act q x) ~> Act (p ** q) x Source Comments #

multiplicatorInv :: forall (p :: COPROD Type) (q :: COPROD Type) x. Obj p -> Obj q -> Obj x -> Act (p ** q) x ~> Act p (Act q x) Source Comments #

MonoidalAction (COPROD Type) (COPROD Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Associated Types

type Act (p :: COPROD Type) (x :: COPROD Type) 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type Act (p :: COPROD Type) (x :: COPROD Type) = p ** x

Methods

act :: forall (p :: COPROD Type) (q :: COPROD Type) (x :: COPROD Type) (y :: COPROD Type). (p ~> q) -> (x ~> y) -> Act p x ~> Act q y Source Comments #

unitor :: forall (x :: COPROD Type). Obj x -> Act (Unit :: COPROD Type) x ~> x Source Comments #

unitorInv :: forall (x :: COPROD Type). Obj x -> x ~> Act (Unit :: COPROD Type) x Source Comments #

multiplicator :: forall (p :: COPROD Type) (q :: COPROD Type) (x :: COPROD Type). Obj p -> Obj q -> Obj x -> Act p (Act q x) ~> Act (p ** q) x Source Comments #

multiplicatorInv :: forall (p :: COPROD Type) (q :: COPROD Type) (x :: COPROD Type). Obj p -> Obj q -> Obj x -> Act (p ** q) x ~> Act p (Act q x) Source Comments #

CategoryOf k => Promonad (Coprod :: COPROD k -> COPROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Methods

id :: forall (a :: COPROD k). Ob a => Coprod a a Source Comments #

(.) :: forall (b :: COPROD k) (c :: COPROD k) (a :: COPROD k). Coprod b c -> Coprod a b -> Coprod a c Source Comments #

Tambara (Coprod :: COPROD Type -> COPROD Type -> Type) (Replacing a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

tambara :: forall (x :: COPROD Type) (x' :: COPROD Type) a0 b0. Coprod x x' -> Replacing a b a0 b0 -> Replacing a b (Act x a0) (Act x' b0) Source Comments #

Tambara (Coprod :: COPROD Type -> COPROD Type -> Type) (Setting a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

tambara :: forall (x :: COPROD Type) (x' :: COPROD Type) a0 b0. Coprod x x' -> Setting a b a0 b0 -> Setting a b (Act x a0) (Act x' b0) Source Comments #

HasCoproducts k => MonoidalProfunctor (Coprod :: COPROD k -> COPROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Methods

lift0 :: Coprod (Unit :: COPROD k) (Unit :: COPROD k) Source Comments #

lift2 :: forall (x1 :: COPROD k) (x2 :: COPROD k) (y1 :: COPROD k) (y2 :: COPROD k). Coprod x1 x2 -> Coprod y1 y2 -> Coprod (x1 ** y1) (x2 ** y2) Source Comments #

CategoryOf k => Profunctor (Coprod :: COPROD k -> COPROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Methods

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

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

Tambara (Coprod :: COPROD Type -> COPROD Type -> Type) (Previewing a b :: COPROD Type -> COPROD Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

tambara :: forall (x :: COPROD Type) (x' :: COPROD Type) (a0 :: COPROD Type) (b0 :: COPROD Type). Coprod x x' -> Previewing a b a0 b0 -> Previewing a b (Act x a0) (Act x' b0) Source Comments #

Profunctor (Previewing a b :: COPROD Type -> COPROD Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

dimap :: forall (c :: COPROD Type) (a0 :: COPROD Type) (b0 :: COPROD Type) (d :: COPROD Type). (c ~> a0) -> (b0 ~> d) -> Previewing a b a0 b0 -> Previewing a b c d Source Comments #

(\\) :: forall (a0 :: COPROD Type) (b0 :: COPROD Type) r. ((Ob a0, Ob b0) => r) -> Previewing a b a0 b0 -> r Source Comments #

(HasProducts j, HasCoproducts k, Proalternative p) => MonoidalProfunctor (Alt p :: PROD j -> COPROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

lift0 :: Alt p (Unit :: PROD j) (Unit :: COPROD k) Source Comments #

lift2 :: forall (x1 :: PROD j) (x2 :: COPROD k) (y1 :: PROD j) (y2 :: COPROD k). Alt p x1 x2 -> Alt p y1 y2 -> Alt p (x1 ** y1) (x2 ** y2) Source Comments #

Profunctor p => Profunctor (Alt p :: PROD j -> COPROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

dimap :: forall (c :: PROD j) (a :: PROD j) (b :: COPROD k) (d :: COPROD k). (c ~> a) -> (b ~> d) -> Alt p a b -> Alt p c d Source Comments #

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

type Act (p :: Type) ('COPR x :: COPROD Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type Act (p :: Type) ('COPR x :: COPROD Type) = 'COPR (p ** x)
type UN ('COPR :: j -> COPROD j) ('COPR k :: COPROD j) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

type UN ('COPR :: j -> COPROD j) ('COPR k :: COPROD j) = k
type Unit Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

type Unit = 'COPR (InitialObject :: k)
type (~>) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

type (~>) = Coprod :: COPROD k -> COPROD k -> Type
type Ob (a :: COPROD k) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

type Ob (a :: COPROD k) = (Is ('COPR :: k -> COPROD k) a, Ob (UN ('COPR :: k -> COPROD k) a))
type (a :: COPROD k) ** (b :: COPROD k) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

type (a :: COPROD k) ** (b :: COPROD k) = 'COPR (UN ('COPR :: k -> COPROD k) a || UN ('COPR :: k -> COPROD k) b)
type Act (p :: COPROD Type) (x :: Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type Act (p :: COPROD Type) (x :: Type) = UN ('COPR :: Type -> COPROD Type) (p ** 'COPR x)
type Act (p :: COPROD Type) (x :: COPROD Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

type Act (p :: COPROD Type) (x :: COPROD Type) = p ** x

data Coprod (a :: COPROD k) (b :: COPROD k) where Source Comments #

Constructors

Coprod 

Fields

Instances

Instances details
CategoryOf k => Promonad (Coprod :: COPROD k -> COPROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Methods

id :: forall (a :: COPROD k). Ob a => Coprod a a Source Comments #

(.) :: forall (b :: COPROD k) (c :: COPROD k) (a :: COPROD k). Coprod b c -> Coprod a b -> Coprod a c Source Comments #

Tambara (Coprod :: COPROD Type -> COPROD Type -> Type) (Replacing a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

tambara :: forall (x :: COPROD Type) (x' :: COPROD Type) a0 b0. Coprod x x' -> Replacing a b a0 b0 -> Replacing a b (Act x a0) (Act x' b0) Source Comments #

Tambara (Coprod :: COPROD Type -> COPROD Type -> Type) (Setting a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

tambara :: forall (x :: COPROD Type) (x' :: COPROD Type) a0 b0. Coprod x x' -> Setting a b a0 b0 -> Setting a b (Act x a0) (Act x' b0) Source Comments #

HasCoproducts k => MonoidalProfunctor (Coprod :: COPROD k -> COPROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Methods

lift0 :: Coprod (Unit :: COPROD k) (Unit :: COPROD k) Source Comments #

lift2 :: forall (x1 :: COPROD k) (x2 :: COPROD k) (y1 :: COPROD k) (y2 :: COPROD k). Coprod x1 x2 -> Coprod y1 y2 -> Coprod (x1 ** y1) (x2 ** y2) Source Comments #

CategoryOf k => Profunctor (Coprod :: COPROD k -> COPROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Object.BinaryCoproduct

Methods

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

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

Tambara (Coprod :: COPROD Type -> COPROD Type -> Type) (Previewing a b :: COPROD Type -> COPROD Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

tambara :: forall (x :: COPROD Type) (x' :: COPROD Type) (a0 :: COPROD Type) (b0 :: COPROD Type). Coprod x x' -> Previewing a b a0 b0 -> Previewing a b (Act x a0) (Act x' b0) Source Comments #

mkCoprod :: forall k (a :: k) (b :: k). CategoryOf k => (a ~> b) -> Coprod ('COPR a) ('COPR b) Source Comments #