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

Proarrow.Category.Instance.Nat

Documentation

data Nat (f :: j -> k) (g :: j -> k) where Source Comments #

Constructors

Nat 

Fields

Instances

Instances details
Promonad (Nat :: (j -> Type) -> (j -> Type) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

id :: forall (a :: j -> Type). Ob a => Nat a a Source Comments #

(.) :: forall (b :: j -> Type) (c :: j -> Type) (a :: j -> Type). Nat b c -> Nat a b -> Nat a c Source Comments #

Promonad (Nat :: (k1 -> k2 -> k3 -> k4 -> Type) -> (k1 -> k2 -> k3 -> k4 -> Type) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

id :: forall (a :: k1 -> k2 -> k3 -> k4 -> Type). Ob a => Nat a a Source Comments #

(.) :: forall (b :: k1 -> k2 -> k3 -> k4 -> Type) (c :: k1 -> k2 -> k3 -> k4 -> Type) (a :: k1 -> k2 -> k3 -> k4 -> Type). Nat b c -> Nat a b -> Nat a c Source Comments #

Promonad (Nat :: (k1 -> k2 -> k3 -> Type) -> (k1 -> k2 -> k3 -> Type) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

id :: forall (a :: k1 -> k2 -> k3 -> Type). Ob a => Nat a a Source Comments #

(.) :: forall (b :: k1 -> k2 -> k3 -> Type) (c :: k1 -> k2 -> k3 -> Type) (a :: k1 -> k2 -> k3 -> Type). Nat b c -> Nat a b -> Nat a c Source Comments #

Strong (Nat :: (Type -> Type) -> (Type -> Type) -> Type) (Replacing a b :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: Type -> Type) (b0 :: Type -> Type) x y. Nat a0 b0 -> Replacing a b x y -> Replacing a b (Act a0 x) (Act b0 y) Source Comments #

Strong (Nat :: (Type -> Type) -> (Type -> Type) -> Type) (->) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

act :: forall (a :: Type -> Type) (b :: Type -> Type) x y. Nat a b -> (x -> y) -> Act a x -> Act b y Source Comments #

MonoidalProfunctor (Nat :: (Type -> Type) -> (Type -> Type) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

par0 :: Nat (Unit :: Type -> Type) (Unit :: Type -> Type) Source Comments #

par :: forall (x1 :: Type -> Type) (x2 :: Type -> Type) (y1 :: Type -> Type) (y2 :: Type -> Type). Nat x1 x2 -> Nat y1 y2 -> Nat (x1 ** y1) (x2 ** y2) Source Comments #

Profunctor (Nat :: (k1 -> k2 -> k3 -> k4 -> Type) -> (k1 -> k2 -> k3 -> k4 -> Type) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

dimap :: forall (c :: k1 -> k2 -> k3 -> k4 -> Type) (a :: k1 -> k2 -> k3 -> k4 -> Type) (b :: k1 -> k2 -> k3 -> k4 -> Type) (d :: k1 -> k2 -> k3 -> k4 -> Type). (c ~> a) -> (b ~> d) -> Nat a b -> Nat c d Source Comments #

(\\) :: forall (a :: k1 -> k2 -> k3 -> k4 -> Type) (b :: k1 -> k2 -> k3 -> k4 -> Type) r. ((Ob a, Ob b) => r) -> Nat a b -> r Source Comments #

Profunctor (Nat :: (k1 -> k2 -> k3 -> Type) -> (k1 -> k2 -> k3 -> Type) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

dimap :: forall (c :: k1 -> k2 -> k3 -> Type) (a :: k1 -> k2 -> k3 -> Type) (b :: k1 -> k2 -> k3 -> Type) (d :: k1 -> k2 -> k3 -> Type). (c ~> a) -> (b ~> d) -> Nat a b -> Nat c d Source Comments #

(\\) :: forall (a :: k1 -> k2 -> k3 -> Type) (b :: k1 -> k2 -> k3 -> Type) r. ((Ob a, Ob b) => r) -> Nat a b -> r Source Comments #

Profunctor (Nat :: (k1 -> Type) -> (k1 -> Type) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

dimap :: forall (c :: k1 -> Type) (a :: k1 -> Type) (b :: k1 -> Type) (d :: k1 -> Type). (c ~> a) -> (b ~> d) -> Nat a b -> Nat c d Source Comments #

(\\) :: forall (a :: k1 -> Type) (b :: k1 -> Type) r. ((Ob a, Ob b) => r) -> Nat a b -> r Source Comments #

(!) :: forall {j} {k} (f :: j -> k) (g :: j -> k) (a :: j) (b :: j). Nat f g -> (a ~> b) -> f a ~> g b Source Comments #

data ((f :: k -> Type) :~>: (g :: k -> Type)) (a :: k) where Source Comments #

Constructors

Exp :: forall {k} (a :: k) (f :: k -> Type) (g :: k -> Type). Ob a => (forall (b :: k). (a ~> b) -> f b -> g b) -> (f :~>: g) a 

Instances

Instances details
(Functor f, Functor g) => Functor (f :~>: g :: k1 -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

map :: forall (a :: k1) (b :: k1). (a ~> b) -> (f :~>: g) a ~> (f :~>: g) b Source Comments #

newtype HaskRan (j :: k -> Type) (h :: k -> Type) a Source Comments #

Constructors

Ran 

Fields

  • runRan :: forall (b :: k). (a -> j b) -> h b
     

Instances

Instances details
Functor (HaskRan j h :: Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

map :: (a ~> b) -> HaskRan j h a ~> HaskRan j h b Source Comments #

data HaskLan (j :: k -> Type) (f :: k -> Type) a where Source Comments #

Constructors

Lan :: forall {k} (j :: k -> Type) (b :: k) a (f :: k -> Type). (j b -> a) -> f b -> HaskLan j f a 

Instances

Instances details
Functor (HaskLan j f :: Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

map :: (a ~> b) -> HaskLan j f a ~> HaskLan j f b Source Comments #

data CatAsComonoid k a where Source Comments #

Constructors

CatAsComonoid :: forall {k} (c :: k) a. Ob c => (forall (c' :: k). (c ~> c') -> a) -> CatAsComonoid k a 

data ComonoidAsCat (w :: Type -> Type) a b where Source Comments #

Constructors

ComonoidAsCat :: forall (w :: Type -> Type) a b. (w a -> b) -> ComonoidAsCat w a b 

Instances

Instances details
Functor w => Profunctor (ComonoidAsCat w :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

dimap :: (c ~> a) -> (b ~> d) -> ComonoidAsCat w a b -> ComonoidAsCat w c d Source Comments #

(\\) :: ((Ob a, Ob b) => r) -> ComonoidAsCat w a b -> r Source Comments #

Comonoid w => Promonad (ComonoidAsCat w :: Type -> Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

newtype NatK j k Source Comments #

Constructors

NT (j -> k) 

Instances

Instances details
CategoryOf (NatK j k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Nat

type (~>) = Nat' :: NatK j k -> NatK j k -> Type
Promonad (Nat' :: NatK j k -> NatK j k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

id :: forall (a :: NatK j k). Ob a => Nat' a a Source Comments #

(.) :: forall (b :: NatK j k) (c :: NatK j k) (a :: NatK j k). Nat' b c -> Nat' a b -> Nat' a c Source Comments #

Profunctor (Nat' :: NatK j k -> NatK j k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

dimap :: forall (c :: NatK j k) (a :: NatK j k) (b :: NatK j k) (d :: NatK j k). (c ~> a) -> (b ~> d) -> Nat' a b -> Nat' c d Source Comments #

(\\) :: forall (a :: NatK j k) (b :: NatK j k) r. ((Ob a, Ob b) => r) -> Nat' a b -> r Source Comments #

type (~>) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

type (~>) = Nat' :: NatK j k -> NatK j k -> Type
type Ob (f :: NatK j k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

type Ob (f :: NatK j k) = (Is ('NT :: (j -> k) -> NatK j k) f, Functor (UN ('NT :: (j -> k) -> NatK j k) f))
type UN ('NT :: (j -> k) -> NatK j k) ('NT f :: NatK j k) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

type UN ('NT :: (j -> k) -> NatK j k) ('NT f :: NatK j k) = f

data Nat' (f :: NatK k k1) (g :: NatK k k1) where Source Comments #

Constructors

Nat' 

Fields

Instances

Instances details
Promonad (Nat' :: NatK j k -> NatK j k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

id :: forall (a :: NatK j k). Ob a => Nat' a a Source Comments #

(.) :: forall (b :: NatK j k) (c :: NatK j k) (a :: NatK j k). Nat' b c -> Nat' a b -> Nat' a c Source Comments #

Profunctor (Nat' :: NatK j k -> NatK j k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

dimap :: forall (c :: NatK j k) (a :: NatK j k) (b :: NatK j k) (d :: NatK j k). (c ~> a) -> (b ~> d) -> Nat' a b -> Nat' c d Source Comments #

(\\) :: forall (a :: NatK j k) (b :: NatK j k) r. ((Ob a, Ob b) => r) -> Nat' a b -> r Source Comments #

Orphan instances

(Functor f, Functor g) => Functor (Product f g :: k1 -> Type) Source Comments # 
Instance details

Methods

map :: forall (a :: k1) (b :: k1). (a ~> b) -> Product f g a ~> Product f g b Source Comments #

(Functor f, Functor g) => Functor (Sum f g :: k1 -> Type) Source Comments # 
Instance details

Methods

map :: forall (a :: k1) (b :: k1). (a ~> b) -> Sum f g a ~> Sum f g b Source Comments #

CategoryOf k1 => Closed (PROD (k1 -> Type)) Source Comments # 
Instance details

Methods

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

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

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

Monoidal (Type -> Type) Source Comments # 
Instance details

Associated Types

type Unit 
Instance details

Defined in Proarrow.Category.Instance.Nat

type Unit = Identity
type (f :: Type -> Type) ** (g :: Type -> Type) 
Instance details

Defined in Proarrow.Category.Instance.Nat

type (f :: Type -> Type) ** (g :: Type -> Type) = Compose f g

Methods

leftUnitor :: forall (a :: Type -> Type). Ob a => ((Unit :: Type -> Type) ** a) ~> a Source Comments #

leftUnitorInv :: forall (a :: Type -> Type). Ob a => a ~> ((Unit :: Type -> Type) ** a) Source Comments #

rightUnitor :: forall (a :: Type -> Type). Ob a => (a ** (Unit :: Type -> Type)) ~> a Source Comments #

rightUnitorInv :: forall (a :: Type -> Type). Ob a => a ~> (a ** (Unit :: Type -> Type)) Source Comments #

associator :: forall (a :: Type -> Type) (b :: Type -> Type) (c :: Type -> Type). (Ob a, Ob b, Ob c) => ((a ** b) ** c) ~> (a ** (b ** c)) Source Comments #

associatorInv :: forall (a :: Type -> Type) (b :: Type -> Type) (c :: Type -> Type). (Ob a, Ob b, Ob c) => (a ** (b ** c)) ~> ((a ** b) ** c) Source Comments #

CategoryOf (k1 -> k2 -> k3 -> k4 -> Type) Source Comments # 
Instance details

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Nat

type (~>) = Nat :: (k1 -> k2 -> k3 -> k4 -> Type) -> (k1 -> k2 -> k3 -> k4 -> Type) -> Type
CategoryOf (k1 -> k2 -> k3 -> Type) Source Comments # 
Instance details

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Nat

type (~>) = Nat :: (k1 -> k2 -> k3 -> Type) -> (k1 -> k2 -> k3 -> Type) -> Type
CategoryOf (k1 -> Type) Source Comments # 
Instance details

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Nat

type (~>) = Nat :: (k1 -> Type) -> (k1 -> Type) -> Type
HasBinaryCoproducts (k1 -> Type) Source Comments # 
Instance details

Methods

lft :: forall (a :: k1 -> Type) (b :: k1 -> Type). (Ob a, Ob b) => a ~> (a || b) Source Comments #

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

rgt :: forall (a :: k1 -> Type) (b :: k1 -> Type). (Ob a, Ob b) => b ~> (a || b) Source Comments #

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

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

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

HasBinaryProducts (k1 -> Type) Source Comments # 
Instance details

Methods

fst :: forall (a :: k1 -> Type) (b :: k1 -> Type). (Ob a, Ob b) => (a && b) ~> a Source Comments #

fst' :: forall (a :: k1 -> Type) (a' :: k1 -> Type) (b :: k1 -> Type). (a ~> a') -> Obj b -> (a && b) ~> a' Source Comments #

snd :: forall (a :: k1 -> Type) (b :: k1 -> Type). (Ob a, Ob b) => (a && b) ~> b Source Comments #

snd' :: forall (a :: k1 -> Type) (b :: k1 -> Type) (b' :: k1 -> Type). Obj a -> (b ~> b') -> (a && b) ~> b' Source Comments #

(&&&) :: forall (a :: k1 -> Type) (x :: k1 -> Type) (y :: k1 -> Type). (a ~> x) -> (a ~> y) -> a ~> (x && y) Source Comments #

(***) :: forall (a :: k1 -> Type) (b :: k1 -> Type) (x :: k1 -> Type) (y :: k1 -> Type). (a ~> x) -> (b ~> y) -> (a && b) ~> (x && y) Source Comments #

Coclosed (Type -> Type) Source Comments # 
Instance details

Associated Types

type (f :: Type -> Type) <~~ (j :: Type -> Type) 
Instance details

Defined in Proarrow.Category.Instance.Nat

type (f :: Type -> Type) <~~ (j :: Type -> Type) = HaskLan j f

Methods

coeval' :: forall (a :: Type -> Type) (b :: Type -> Type). Obj a -> Obj b -> a ~> ((a <~~ b) ** b) Source Comments #

coevalUniv' :: forall (b :: Type -> Type) (c :: Type -> Type) (a :: Type -> Type). Obj b -> Obj c -> (a ~> (c ** b)) -> (a <~~ b) ~> c Source Comments #

Closed (Type -> Type) Source Comments # 
Instance details

Associated Types

type (j :: Type -> Type) ~~> (h :: Type -> Type) 
Instance details

Defined in Proarrow.Category.Instance.Nat

type (j :: Type -> Type) ~~> (h :: Type -> Type) = HaskRan j h

Methods

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

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

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

CategoryOf k1 => HasInitialObject (k1 -> Type) Source Comments # 
Instance details

Associated Types

type InitialObject 
Instance details

Defined in Proarrow.Category.Instance.Nat

type InitialObject = Const Void :: k1 -> Type

Methods

initiate :: forall (a :: k1 -> Type). Ob a => (InitialObject :: k1 -> Type) ~> a Source Comments #

initiate' :: forall (a' :: k1 -> Type) (a :: k1 -> Type). (a' ~> a) -> (InitialObject :: k1 -> Type) ~> a Source Comments #

CategoryOf k1 => HasTerminalObject (k1 -> Type) Source Comments # 
Instance details

Associated Types

type TerminalObject 
Instance details

Defined in Proarrow.Category.Instance.Nat

type TerminalObject = Const () :: k1 -> Type

Methods

terminate :: forall (a :: k1 -> Type). Ob a => a ~> (TerminalObject :: k1 -> Type) Source Comments #

terminate' :: forall (a :: k1 -> Type) (a' :: k1 -> Type). (a ~> a') -> a ~> (TerminalObject :: k1 -> Type) Source Comments #

MonoidalAction (Type -> Type) Type Source Comments # 
Instance details

Associated Types

type Act (p :: Type -> Type) (x :: Type) 
Instance details

Defined in Proarrow.Category.Instance.Nat

type Act (p :: Type -> Type) (x :: Type) = p x

Methods

unitor :: Ob x => Act (Unit :: Type -> Type) x ~> x Source Comments #

unitorInv :: Ob x => x ~> Act (Unit :: Type -> Type) x Source Comments #

multiplicator :: forall (a :: Type -> Type) (b :: Type -> Type) x. (Ob a, Ob b, Ob x) => Act a (Act b x) ~> Act (a ** b) x Source Comments #

multiplicatorInv :: forall (a :: Type -> Type) (b :: Type -> Type) x. (Ob a, Ob b, Ob x) => Act (a ** b) x ~> Act a (Act b x) Source Comments #