proarrow
Safe HaskellNone
LanguageHaskell2010

Proarrow.Category.Instance.Rel

Documentation

class (ThinProfunctor p, Discrete j, Discrete k) => Relation (p :: j +-> k) Source Comments #

Instances

Instances details
(ThinProfunctor p, Discrete j, Discrete k) => Relation (p :: j +-> k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Rel

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

Constructors

Converse :: forall {j} {k} (p :: j +-> k) (b :: k) (a :: j). p b a -> Converse p a b 

Instances

Instances details
Relation p => Profunctor (Converse p :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Rel

Methods

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

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

Relation p => ThinProfunctor (Converse p :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Rel

Methods

arr :: forall (a :: k) (b :: j). (Ob a, Ob b, HasArrow (Converse p) a b) => Converse p a b Source Comments #

withArr :: forall (a :: k) (b :: j) r. Converse p a b -> (HasArrow (Converse p) a b => r) -> r Source Comments #

(Relation p, Representable p) => Corepresentable (Converse p :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Rel

Methods

coindex :: forall (a :: k) (b :: j). Converse p a b -> (Converse p %% a) ~> b Source Comments #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((Converse p %% a) ~> b) -> Converse p a b Source Comments #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Converse p %% a) ~> (Converse p %% b) Source Comments #

type (Converse p :: k -> j -> Type) %% (a :: k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Rel

type (Converse p :: k -> j -> Type) %% (a :: k) = p % a
type HasArrow (Converse p :: k -> j -> Type) (a :: k) (b :: j) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Rel

type HasArrow (Converse p :: k -> j -> Type) (a :: k) (b :: j) = HasArrow p b a

asImplication :: forall {k} {j} (a :: k) (b :: j) (p :: j +-> k) (q :: j +-> k) r. (Relation p, Relation q) => (p :~> q) -> (Ob a, Ob b, HasArrow p a b) => (HasArrow q a b => r) -> r Source Comments #

class Relation p => Functional (p :: j +-> k1) where Source Comments #

Methods

isFunctional :: (p :.: Converse p) :~> ((~>) :: CAT k1) Source Comments #

reprIsFunctional :: forall {j} {k1} (p :: j +-> k1). (Relation p, Representable p) => (p :.: Converse p) :~> ((~>) :: CAT k1) Source Comments #

class Relation p => Total (p :: k1 +-> j) where Source Comments #

Methods

isTotal :: ((~>) :: CAT k1) :~> (Converse p :.: p) Source Comments #

reprIsTotal :: forall {k1} {j} (p :: k1 +-> j). (Relation p, Representable p) => ((~>) :: CAT k1) :~> (Converse p :.: p) Source Comments #

class Relation p => Injective (p :: k1 +-> j) where Source Comments #

Methods

isInjective :: (Converse p :.: p) :~> ((~>) :: CAT k1) Source Comments #

class Relation p => Surjective (p :: j +-> k1) where Source Comments #

Methods

isSurjective :: ((~>) :: CAT k1) :~> (p :.: Converse p) Source Comments #

adjToConverse :: forall {j} {k} (p :: j +-> k) (q :: k +-> j). (Relation p, Relation q, Adjunction p q) => q :~> Converse p Source Comments #

adjFromConverse :: forall {k} {k1} (p :: k +-> k1) (q :: k1 +-> k). (Relation p, Relation q, Adjunction p q) => Converse p :~> q Source Comments #

class (Relation p, Promonad p) => Preorder (p :: k +-> k) Source Comments #

Instances

Instances details
(Relation p, Promonad p) => Preorder (p :: k +-> k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Rel