proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Instance.Ap

Documentation

data AP (f :: Type -> Type) k Source Comments #

Constructors

A k 

Instances

Instances details
(Applicative f, Monoidal k) => Applicative ('A :: k -> AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Methods

pure :: forall (a :: k). ((Unit :: k) ~> a) -> (Unit :: AP f k) ~> ('A a :: AP f k) Source Comments #

liftA2 :: forall (a :: k) (b :: k) (c :: k). (Ob a, Ob b) => ((a ** b) ~> c) -> (('A a :: AP f k) ** ('A b :: AP f k)) ~> ('A c :: AP f k) Source Comments #

(Applicative f, CategoryOf k) => Functor ('A :: k -> AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Methods

map :: forall (a :: k) (b :: k). (a ~> b) -> ('A a :: AP f k) ~> ('A b :: AP f k) Source Comments #

(Applicative f, Monoidal k) => Monoidal (AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Associated Types

type Unit 
Instance details

Defined in Proarrow.Category.Instance.Ap

type Unit = 'A (Unit :: k) :: AP f k

Methods

withOb2 :: forall (a :: AP f k) (b :: AP f k) r. (Ob a, Ob b) => (Ob (a ** b) => r) -> r Source Comments #

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

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

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

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

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

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

(Applicative f, SymMonoidal k) => SymMonoidal (AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Methods

swap :: forall (a :: AP f k) (b :: AP f k). (Ob a, Ob b) => (a ** b) ~> (b ** a) Source Comments #

(Applicative f, CategoryOf k) => CategoryOf (AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Ap

type (~>) = Ap ((~>) :: CAT k) :: AP f k -> AP f k -> Type
(Applicative f, HasBinaryCoproducts k) => HasBinaryCoproducts (AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Methods

withObCoprod :: forall (a :: AP f k) (b :: AP f k) r. (Ob a, Ob b) => (Ob (a || b) => r) -> r Source Comments #

lft :: forall (a :: AP f k) (b :: AP f k). (Ob a, Ob b) => a ~> (a || b) Source Comments #

rgt :: forall (a :: AP f k) (b :: AP f k). (Ob a, Ob b) => b ~> (a || b) Source Comments #

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

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

(Applicative f, HasBinaryProducts k) => HasBinaryProducts (AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Methods

withObProd :: forall (a :: AP f k) (b :: AP f k) r. (Ob a, Ob b) => (Ob (a && b) => r) -> r Source Comments #

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

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

(&&&) :: forall (a :: AP f k) (x :: AP f k) (y :: AP f k). (a ~> x) -> (a ~> y) -> a ~> (x && y) Source Comments #

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

(Applicative f, HasInitialObject k) => HasInitialObject (AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Associated Types

type InitialObject 
Instance details

Defined in Proarrow.Category.Instance.Ap

type InitialObject = 'A (InitialObject :: k) :: AP f k

Methods

initiate :: forall (a :: AP f k). Ob a => (InitialObject :: AP f k) ~> a Source Comments #

(Applicative f, HasTerminalObject k) => HasTerminalObject (AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Associated Types

type TerminalObject 
Instance details

Defined in Proarrow.Category.Instance.Ap

type TerminalObject = 'A (TerminalObject :: k) :: AP f k

Methods

terminate :: forall (a :: AP f k). Ob a => a ~> (TerminalObject :: AP f k) Source Comments #

(Applicative f, MonoidalProfunctor p) => MonoidalProfunctor (Ap p :: AP f k -> AP f j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Methods

par0 :: Ap p (Unit :: AP f k) (Unit :: AP f j) Source Comments #

par :: forall (x1 :: AP f k) (x2 :: AP f j) (y1 :: AP f k) (y2 :: AP f j). Ap p x1 x2 -> Ap p y1 y2 -> Ap p (x1 ** y1) (x2 ** y2) Source Comments #

(Applicative f, Profunctor p) => Profunctor (Ap p :: AP f k -> AP f j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Methods

dimap :: forall (c :: AP f k) (a :: AP f k) (b :: AP f j) (d :: AP f j). (c ~> a) -> (b ~> d) -> Ap p a b -> Ap p c d Source Comments #

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

(Applicative f, Promonad p) => Promonad (Ap p :: AP f k -> AP f k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Methods

id :: forall (a :: AP f k). Ob a => Ap p a a Source Comments #

(.) :: forall (b :: AP f k) (c :: AP f k) (a :: AP f k). Ap p b c -> Ap p a b -> Ap p a c Source Comments #

type UN ('A :: j -> AP f j) ('A k :: AP f j) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

type UN ('A :: j -> AP f j) ('A k :: AP f j) = k
type Unit Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

type Unit = 'A (Unit :: k) :: AP f k
type (~>) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

type (~>) = Ap ((~>) :: CAT k) :: AP f k -> AP f k -> Type
type InitialObject Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

type InitialObject = 'A (InitialObject :: k) :: AP f k
type TerminalObject Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

type TerminalObject = 'A (TerminalObject :: k) :: AP f k
type Ob (a :: AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

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

Defined in Proarrow.Category.Instance.Ap

type (a :: AP f k) ** (b :: AP f k) = 'A (UN ('A :: k -> AP f k) a ** UN ('A :: k -> AP f k) b) :: AP f k
type (a :: AP f k) || (b :: AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

type (a :: AP f k) || (b :: AP f k) = 'A (UN ('A :: k -> AP f k) a || UN ('A :: k -> AP f k) b) :: AP f k
type (a :: AP f k) && (b :: AP f k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

type (a :: AP f k) && (b :: AP f k) = 'A (UN ('A :: k -> AP f k) a && UN ('A :: k -> AP f k) b) :: AP f k

data Ap (p :: j +-> k) (a :: AP f k) (b :: AP f j) where Source Comments #

Constructors

Ap 

Fields

  • :: forall {k} {j} (a1 :: k) (b1 :: j) (f :: Type -> Type) (p :: j +-> k). (Ob a1, Ob b1)
     
  • => { unAp :: f (p a1 b1)
     
  •    } -> Ap p ('A a1 :: AP f k) ('A b1 :: AP f j)
     

Instances

Instances details
(Applicative f, MonoidalProfunctor p) => MonoidalProfunctor (Ap p :: AP f k -> AP f j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Methods

par0 :: Ap p (Unit :: AP f k) (Unit :: AP f j) Source Comments #

par :: forall (x1 :: AP f k) (x2 :: AP f j) (y1 :: AP f k) (y2 :: AP f j). Ap p x1 x2 -> Ap p y1 y2 -> Ap p (x1 ** y1) (x2 ** y2) Source Comments #

(Applicative f, Profunctor p) => Profunctor (Ap p :: AP f k -> AP f j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Methods

dimap :: forall (c :: AP f k) (a :: AP f k) (b :: AP f j) (d :: AP f j). (c ~> a) -> (b ~> d) -> Ap p a b -> Ap p c d Source Comments #

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

(Applicative f, Promonad p) => Promonad (Ap p :: AP f k -> AP f k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Ap

Methods

id :: forall (a :: AP f k). Ob a => Ap p a a Source Comments #

(.) :: forall (b :: AP f k) (c :: AP f k) (a :: AP f k). Ap p b c -> Ap p a b -> Ap p a c Source Comments #

arr :: forall {k1} (f :: Type -> Type) k2 p (a :: k1) (b :: k2). (Applicative f, Profunctor p) => p a b -> Ap p ('A a :: AP f k1) ('A b :: AP f k2) Source Comments #