proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Instance.Nat

Description

Functor categories: Nat is the type of natural transformations between functors j -> k, and the kind j -> Type carries the category of Functors with Nat as its morphisms and pointwise (co)limits. On Type -> Type, functor composition additionally gives a (closed) monoidal structure -- the home of monads-as-monoids.

Synopsis

Documentation

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

Constructors

Nat 

Fields

Instances

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

Defined in Proarrow.Category.Instance.Nat

Methods

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

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

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

Defined in Proarrow.Category.Instance.Nat

Methods

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

(.) :: 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 Github #

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

Defined in Proarrow.Category.Instance.Nat

Methods

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

(.) :: 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 Github #

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

Defined in Proarrow.Category.Instance.Nat

Methods

one :: Nat (Unit :: Type -> Type) (Unit :: Type -> Type) Source Github #

(**) :: 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 Github #

Profunctor (Nat :: (k1 -> k2 -> k3 -> k4 -> Type) -> (k1 -> k2 -> k3 -> k4 -> Type) -> Type) Source Github # 
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 Github #

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

rmap :: forall (b :: k1 -> k2 -> k3 -> k4 -> Type) (d :: k1 -> k2 -> k3 -> k4 -> Type) (a :: k1 -> k2 -> k3 -> k4 -> Type). (b ~> d) -> Nat a b -> Nat a d Source Github #

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

Profunctor (Nat :: (k1 -> k2 -> k3 -> Type) -> (k1 -> k2 -> k3 -> Type) -> Type) Source Github # 
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 Github #

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

rmap :: forall (b :: k1 -> k2 -> k3 -> Type) (d :: k1 -> k2 -> k3 -> Type) (a :: k1 -> k2 -> k3 -> Type). (b ~> d) -> Nat a b -> Nat a d Source Github #

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

Profunctor (Nat :: (k1 -> Type) -> (k1 -> Type) -> Type) Source Github # 
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 Github #

lmap :: forall (c :: k1 -> Type) (a :: k1 -> Type) (b :: k1 -> Type). (c ~> a) -> Nat a b -> Nat c b Source Github #

rmap :: forall (b :: k1 -> Type) (d :: k1 -> Type) (a :: k1 -> Type). (b ~> d) -> Nat a b -> Nat a d Source Github #

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

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

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

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 Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

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

data family ApplyAction' :: (Type -> Type, Type) +-> Type Source Github #

Instances

Instances details
MonoidalAction ApplyAction Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

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

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

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

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

FunctorForRep ApplyAction' Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Associated Types

type ApplyAction' @ ('(f, x) :: (Type -> Type, Type)) 
Instance details

Defined in Proarrow.Category.Instance.Nat

type ApplyAction' @ ('(f, x) :: (Type -> Type, Type)) = f x

Methods

fmap :: forall (a :: (Type -> Type, Type)) (b :: (Type -> Type, Type)). (a ~> b) -> (ApplyAction' @ a) ~> (ApplyAction' @ b) Source Github #

Applicative f => Strong (SubAction Traversable ApplyAction) (Star (Prelude f) :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Star

type ApplyAction' @ ('(f, x) :: (Type -> Type, Type)) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

type ApplyAction' @ ('(f, x) :: (Type -> Type, Type)) = f x

newtype Ran (j1 :: j -> k) (h :: j -> Type) (a :: k) Source Github #

Constructors

Ran 

Fields

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

Instances

Instances details
CategoryOf k => Functor (Ran j2 h :: k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

map :: forall (a :: k) (b :: k). (a ~> b) -> Ran j2 h a ~> Ran j2 h b Source Github #

data Lan (j1 :: j -> k) (f :: j -> Type) (a :: k) where Source Github #

Constructors

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

Instances

Instances details
CategoryOf k => Functor (Lan j2 f :: k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

map :: forall (a :: k) (b :: k). (a ~> b) -> Lan j2 f a ~> Lan j2 f b Source Github #

data ((f :: k -> Type) :^: n) (a :: k) where Source Github #

Constructors

Power 

Fields

  • :: forall {k} (a :: k) n (f :: k -> Type). Ob a
     
  • => { unPower :: n -> f a
     
  •    } -> (f :^: n) a
     

Instances

Instances details
Functor f => Functor (f :^: n :: k1 -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

map :: forall (a :: k1) (b :: k1). (a ~> b) -> (f :^: n) a ~> (f :^: n) b Source Github #

data (n :*.: (f :: k -> Type)) (a :: k) where Source Github #

Constructors

Copower 

Fields

  • :: forall {k} (a :: k) n (f :: k -> Type). Ob a
     
  • => { unCopower :: (n, f a)
     
  •    } -> (n :*.: f) a
     

Instances

Instances details
Functor f => Functor (n :*.: f :: k1 -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

map :: forall (a :: k1) (b :: k1). (a ~> b) -> (n :*.: f) a ~> (n :*.: f) b Source Github #

data CatAsComonoid k a where Source Github #

Constructors

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

Instances

Instances details
Functor (CatAsComonoid k :: Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

map :: (a ~> b) -> CatAsComonoid k a ~> CatAsComonoid k b Source Github #

CategoryOf k => Comonoid (CatAsComonoid k :: Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

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

The coKleisli category of a comonoid w in the functor category: an arrow from a to b is a map w a -> b.

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 Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

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

lmap :: (c ~> a) -> ComonoidAsCat w a b -> ComonoidAsCat w c b Source Github #

rmap :: (b ~> d) -> ComonoidAsCat w a b -> ComonoidAsCat w a d Source Github #

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

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

Defined in Proarrow.Category.Instance.Nat

Methods

id :: Ob a => ComonoidAsCat w a a Source Github #

(.) :: ComonoidAsCat w b c -> ComonoidAsCat w a b -> ComonoidAsCat w a c Source Github #

newtype j .-> k Source Github #

Constructors

NT (j -> k) 

Instances

Instances details
Traversable t => Prostrong (KaleidoFl :: (Type +-> Type) -> (Type +-> Type) -> Constraint) (Costar (Prelude t) :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

proact :: forall (f :: Type +-> Type) (g :: Type +-> Type). (KaleidoFl f g, Profunctor f, Profunctor g) => ((f :.: Costar (Prelude t)) :.: g) :~> Costar (Prelude t) Source Github #

Prostrong (KaleidoFl :: (Type +-> Type) -> (Type +-> Type) -> Constraint) (Costar []) Source Github # 
Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

proact :: forall (f :: Type +-> Type) (g :: Type +-> Type). (KaleidoFl f g, Profunctor f, Profunctor g) => ((f :.: Costar []) :.: g) :~> Costar [] Source Github #

(Cartesian k, Functor f) => Prostrong (PowerGrateFl :: (k +-> k) -> (k +-> k) -> Constraint) (Costar f :: k -> k -> Type) Source Github #

The carrier of the literature's kaleidoscope eliminator (>-): Costar f, i.e. f a -> b for any functor f on a cartesian category. Power grates distribute any MonoidalProfunctor, and Costar f is one, so this is powerGrateP at that carrier; it exists as an instance (rather than only through powerGrateOf) so that a power grate composed with another flavor that also runs at Costar f -- an algebraic lens, say -- can be eliminated there directly.

Instance details

Defined in Proarrow.Optic.PowerGrate

Methods

proact :: forall (f0 :: k +-> k) (g :: k +-> k). (PowerGrateFl f0 g, Profunctor f0, Profunctor g) => ((f0 :.: Costar f) :.: g) :~> Costar f Source Github #

(Functor f, DecidableProfunctor (Hom j)) => DecidableProfunctor (Costar f :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

Methods

decide :: forall (a :: k) (b :: j). (Ob a, Ob b) => Decision (Costar f) a b (Holds (Costar f) a b) Source Github #

toHolds :: forall (a :: k) (b :: j) r. Costar f a b -> ((Holds (Costar f) a b ~ 'TRU, Ob a, Ob b) => r) -> r Source Github #

(Functor f, Thin j) => ThinProfunctor (Costar f :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

Methods

arr :: forall (a :: k) (b :: j). (Ob a, Ob b, HasArrow (Costar f) a b) => Costar f a b Source Github #

withArr :: forall (a :: k) (b :: j) r. Costar f a b -> ((HasArrow (Costar f) a b, Ob a, Ob b) => r) -> r Source Github #

(Cartesian j, Cartesian k, Functor f) => MonoidalProfunctor (Costar f :: j -> k -> Type) Source Github #

Every functor between cartesian categories is a colax monoidal functor.

Instance details

Defined in Proarrow.Profunctor.Instance.Costar

Methods

one :: Costar f (Unit :: j) (Unit :: k) Source Github #

(**) :: forall (x1 :: j) (x2 :: k) (y1 :: j) (y2 :: k). Costar f x1 x2 -> Costar f y1 y2 -> Costar f (x1 ** y1) (x2 ** y2) Source Github #

Functor f => Profunctor (Costar f :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

Methods

dimap :: forall (c :: k) (a :: k) (b :: j) (d :: j). (c ~> a) -> (b ~> d) -> Costar f a b -> Costar f c d Source Github #

lmap :: forall (c :: k) (a :: k) (b :: j). (c ~> a) -> Costar f a b -> Costar f c b Source Github #

rmap :: forall (b :: j) (d :: j) (a :: k). (b ~> d) -> Costar f a b -> Costar f a d Source Github #

(\\) :: forall (a :: k) (b :: j) r. ((Ob a, Ob b) => r) -> Costar f a b -> r Source Github #

Functor f => Corepresentable (Costar f :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

Methods

coindex :: forall (a :: k) (b :: j). Costar f a b -> (Costar f %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((Costar f %% a) ~> b) -> Costar f a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Costar f %% a) ~> (Costar f %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Costar f a (Costar f %% a) Source Github #

Representable (Costar ((,) a) :: Type -> Type -> Type) Source Github #

The right adjoint of (,) a is ((->) a).

Instance details

Defined in Proarrow.Adjunction

Methods

index :: Costar ((,) a) a0 b -> a0 ~> (Costar ((,) a) % b) Source Github #

tabulate :: Ob b => (a0 ~> (Costar ((,) a) % b)) -> Costar ((,) a) a0 b Source Github #

repMap :: (a0 ~> b) -> (Costar ((,) a) % a0) ~> (Costar ((,) a) % b) Source Github #

repUniv :: Ob a0 => Costar ((,) a) (Costar ((,) a) % a0) a0 Source Github #

Functor f => Proadjunction (Star f :: k -> j -> Type) (Costar f :: j -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Adjunction

Methods

unit :: forall (a :: j). Ob a => (Costar f :.: Star f) a a Source Github #

counit :: (Star f :.: Costar f) :~> ((~>) :: CAT k) Source Github #

(Functor t, Traversable (Star t)) => Cotraversable (Costar t :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

Methods

cotraverse :: forall (p :: k +-> k). StrongDistributiveProfunctor p => (p :.: Costar t) :~> (Costar t :.: p) Source Github #

Promonad (Costar ((,) Int)) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Cofree

Methods

id :: Ob a => Costar ((,) Int) a a Source Github #

(.) :: Costar ((,) Int) b c -> Costar ((,) Int) a b -> Costar ((,) Int) a c Source Github #

Traversable t => Kaleidoscopic (Costar (Prelude t) :: Type -> Type -> Type) Source Github #

Costar (Prelude t) for a traversable t: sequence the applicative through t, then aggregate. This carrier is not Cotraversable, see the module header.

Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

kaleidoAct :: forall (p :: Type +-> Type) a b. (Representable p, StrongDistributiveProfunctor p) => Costar (Prelude t) a b -> Costar (Prelude t) (p % a) (p % b) Source Github #

Kaleidoscopic (Costar []) Source Github #

The same for [], which is a Functor in its own right, so the literature's aggregating carrier can be written as a plain [a] -> b.

Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

kaleidoAct :: forall (p :: Type +-> Type) a b. (Representable p, StrongDistributiveProfunctor p) => Costar [] a b -> Costar [] (p % a) (p % b) Source Github #

Monad m => Procomonad (Costar (Prelude m) :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

Functor (Costar' :: OPPOSITE (j .-> k) -> j -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

Methods

map :: forall (a :: OPPOSITE (j .-> k)) (b :: OPPOSITE (j .-> k)). (a ~> b) -> Costar' a ~> Costar' b Source Github #

CategoryOf (j .-> k) Source Github #

The category of functors and natural transformations.

Instance details

Defined in Proarrow.Category.Instance.Nat

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Nat

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

Defined in Proarrow.Category.Instance.Nat

Methods

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

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

Profunctor (Nat' :: (j .-> k) -> (j .-> k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

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

lmap :: forall (c :: j .-> k) (a :: j .-> k) (b :: j .-> k). (c ~> a) -> Nat' a b -> Nat' c b Source Github #

rmap :: forall (b :: j .-> k) (d :: j .-> k) (a :: j .-> k). (b ~> d) -> Nat' a b -> Nat' a d Source Github #

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

(CategoryOf j, CategoryOf k) => Functor (Star' :: (j .-> k) -> k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Star

Methods

map :: forall (a :: j .-> k) (b :: j .-> k). (a ~> b) -> Star' a ~> Star' b Source Github #

Promonad (Costar (Coyoneda :: (j +-> k) -> k -> j -> Type) :: (j +-> k) -> (k -> j -> Type) -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Coyoneda

Methods

id :: forall (a :: j +-> k). Ob a => Costar (Coyoneda :: (j +-> k) -> k -> j -> Type) a a Source Github #

(.) :: forall (b :: j +-> k) (c :: j +-> k) (a :: j +-> k). Costar (Coyoneda :: (j +-> k) -> k -> j -> Type) b c -> Costar (Coyoneda :: (j +-> k) -> k -> j -> Type) a b -> Costar (Coyoneda :: (j +-> k) -> k -> j -> Type) a c Source Github #

Flavor w => Promonad (Costar (Tambara w) :: (j +-> k) -> (k -> j -> Type) -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

id :: forall (a :: j +-> k). Ob a => Costar (Tambara w) a a Source Github #

(.) :: forall (b :: j +-> k) (c :: j +-> k) (a :: j +-> k). Costar (Tambara w) b c -> Costar (Tambara w) a b -> Costar (Tambara w) a c Source Github #

Profunctor p => Promonad (Costar ((:*:) p) :: (j +-> k) -> (k -> j -> Type) -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

Methods

id :: forall (a :: j +-> k). Ob a => Costar ((:*:) p) a a Source Github #

(.) :: forall (b :: j +-> k) (c :: j +-> k) (a :: j +-> k). Costar ((:*:) p) b c -> Costar ((:*:) p) a b -> Costar ((:*:) p) a c Source Github #

Promonad (Costar (Yoneda :: (j +-> k) -> k -> j -> Type) :: (j +-> k) -> (k -> j -> Type) -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Yoneda

Methods

id :: forall (a :: j +-> k). Ob a => Costar (Yoneda :: (j +-> k) -> k -> j -> Type) a a Source Github #

(.) :: forall (b :: j +-> k) (c :: j +-> k) (a :: j +-> k). Costar (Yoneda :: (j +-> k) -> k -> j -> Type) b c -> Costar (Yoneda :: (j +-> k) -> k -> j -> Type) a b -> Costar (Yoneda :: (j +-> k) -> k -> j -> Type) a c Source Github #

type (Costar f :: k -> j -> Type) %% (a :: k) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

type (Costar f :: k -> j -> Type) %% (a :: k) = f a
type (Costar ((,) a) :: Type -> Type -> Type) % (b :: Type) Source Github # 
Instance details

Defined in Proarrow.Adjunction

type (Costar ((,) a) :: Type -> Type -> Type) % (b :: Type) = a -> b
type HasArrow (Costar f :: k -> j -> Type) (a :: k) (b :: j) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

type HasArrow (Costar f :: k -> j -> Type) (a :: k) (b :: j) = HasArrow (Hom j) (f a) b
type Holds (Costar f :: k -> j -> Type) (a :: k) (b :: j) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

type Holds (Costar f :: k -> j -> Type) (a :: k) (b :: j) = Holds (Hom j) (f a) b
type (~>) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

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

Defined in Proarrow.Category.Instance.Nat

type Ob (f :: j .-> k) = (Is ('NT :: (j -> k) -> j .-> k) f, Functor (UN ('NT :: (j -> k) -> j .-> k) f))

data Nat' (f :: k .-> k1) (g :: k .-> k1) where Source Github #

Constructors

Nat' 

Fields

Instances

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

Defined in Proarrow.Category.Instance.Nat

Methods

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

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

Profunctor (Nat' :: (j .-> k) -> (j .-> k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

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

lmap :: forall (c :: j .-> k) (a :: j .-> k) (b :: j .-> k). (c ~> a) -> Nat' a b -> Nat' c b Source Github #

rmap :: forall (b :: j .-> k) (d :: j .-> k) (a :: j .-> k). (b ~> d) -> Nat' a b -> Nat' a d Source Github #

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

first :: forall i j k (f :: i -> j -> k) (c :: j) (a :: i) (b :: i). (Functor f, ((~>) :: CAT (j -> k)) ~ (Nat :: (j -> k) -> (j -> k) -> Type), Ob c) => (a ~> b) -> f a c ~> f b c Source Github #

bimap :: forall i j k (f :: i -> j -> k) (a :: i) (c :: i) (b :: j) (d :: j). (Functor f, ((~>) :: CAT (j -> k)) ~ (Nat :: (j -> k) -> (j -> k) -> Type), Functor (f a)) => (a ~> c) -> (b ~> d) -> f a b ~> f c d Source Github #

Orphan instances

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

Methods

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

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

Methods

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

Copowered Type (k -> Type) Source Github # 
Instance details

Methods

withObCopower :: forall (a :: k -> Type) n r. (Ob a, Ob n) => (Ob (n *. a) => r) -> r Source Github #

copower :: forall (a :: k -> Type) (b :: k -> Type) n. (Ob a, Ob b) => (n ~> HomObj Type a b) -> (n *. a) ~> b Source Github #

uncopower :: forall (a :: k -> Type) n (b :: k -> Type). (Ob a, Ob n) => ((n *. a) ~> b) -> n ~> HomObj Type a b Source Github #

Powered Type (k -> Type) Source Github # 
Instance details

Methods

withObPower :: forall (a :: k -> Type) n r. (Ob a, Ob n) => (Ob (a ^ n) => r) -> r Source Github #

power :: forall (a :: k -> Type) (b :: k -> Type) n. (Ob a, Ob b) => (n ~> HomObj Type a b) -> a ~> (b ^ n) Source Github #

unpower :: forall (b :: k -> Type) n (a :: k -> Type). (Ob b, Ob n) => (a ~> (b ^ n)) -> n ~> HomObj Type a b Source Github #

Functor Either Source Github # 
Instance details

Methods

map :: (a ~> b) -> Either a ~> Either b Source Github #

Functor (,) Source Github # 
Instance details

Methods

map :: (a ~> b) -> (,) a ~> (,) b Source Github #

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

Methods

withObExp :: forall (a :: PROD (k1 -> Type)) (b :: PROD (k1 -> Type)) r. (Ob a, Ob b) => (Ob (a ~~> b) => r) -> r Source Github #

curry :: forall (a :: PROD (k1 -> Type)) (b :: PROD (k1 -> Type)) (c :: PROD (k1 -> Type)). (Ob a, Ob b) => ((a ** b) ~> c) -> a ~> (b ~~> c) Source Github #

apply :: forall (a :: PROD (k1 -> Type)) (b :: PROD (k1 -> Type)). (Ob a, Ob b) => ((a ~~> b) ** a) ~> b Source Github #

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

Monoidal (Type -> Type) Source Github #

Composition as monoidal tensor.

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

withOb2 :: forall (a :: Type -> Type) (b :: Type -> Type) r. (Ob a, Ob b) => (Ob (a ** b) => r) -> r Source Github #

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

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

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

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

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

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

Closed (Type -> Type) Source Github # 
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) = Ran j h

Methods

withObExp :: forall (a :: Type -> Type) (b :: Type -> Type) r. (Ob a, Ob b) => (Ob (a ~~> b) => r) -> r Source Github #

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

apply :: forall (a :: Type -> Type) (b :: Type -> Type). (Ob a, Ob b) => ((a ~~> b) ** a) ~> b Source Github #

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

Coclosed (Type -> Type) Source Github # 
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) = Lan j f

Methods

withObCoExp :: forall (a :: Type -> Type) (b :: Type -> Type) r. (Ob a, Ob b) => (Ob (a <~~ b) => r) -> r Source Github #

coeval :: forall (a :: Type -> Type) (b :: Type -> Type). (Ob a, Ob b) => a ~> ((a <~~ b) ** b) Source Github #

coevalUniv :: forall (b :: Type -> Type) (c :: Type -> Type) (a :: Type -> Type). (Ob b, Ob c) => (a ~> (c ** b)) -> (a <~~ b) ~> c Source Github #

HasBinaryCoproducts (k1 -> Type) Source Github # 
Instance details

Methods

withObCoprod :: forall (a :: k1 -> Type) (b :: k1 -> Type) r. (Ob a, Ob b) => (Ob (a || b) => r) -> r Source Github #

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

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

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

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

CategoryOf k1 => HasInitialObject (k1 -> Type) Source Github # 
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 Github #

CategoryOf (k1 -> k2 -> k3 -> k4 -> Type) Source Github #

The category of functors with target category k2 -> k3 -> k4 -> Type.

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 Github #

The category of functors with target category k2 -> k3 -> Type. Note that CategoryOf (k1 -> k2 -> Type) is reserved for profunctors.

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 Github #

The category of functors with target category Hask.

Instance details

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.Nat

type (~>) = Nat :: (k1 -> Type) -> (k1 -> Type) -> Type
HasBinaryProducts (k1 -> Type) Source Github # 
Instance details

Methods

withObProd :: forall (a :: k1 -> Type) (b :: k1 -> Type) r. (Ob a, Ob b) => (Ob (a && b) => r) -> r Source Github #

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

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

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

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

CategoryOf k1 => HasTerminalObject (k1 -> Type) Source Github # 
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 Github #

Functor ((:.:) :: (j +-> k) -> (i +-> j) -> k -> i -> Type) Source Github # 
Instance details

Methods

map :: forall (a :: j +-> k) (b :: j +-> k). (a ~> b) -> ((:.:) a :: (i +-> j) -> k -> i -> Type) ~> ((:.:) b :: (i +-> j) -> k -> i -> Type) Source Github #