proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Promonad

Description

Promonads as effects: a Promonad (Proarrow.Core) that is Representable is an ordinary Monad on objects (return, bind); a Promonad that is Corepresentable is a Comonad (extract, extend). Also Procomonads and relative (co)monads (RelativeMonad, RelativeComonad). Concrete promonads live in Proarrow.Promonad.*.

Synopsis

Documentation

class Profunctor p => Promonad (p :: CAT k) where Source Github #

A promonad is a category-like profunctor with identity morphisms and composition.

This is also known as a category structure, or an identity-on-objects functor.

Laws:

  • Left identity: id . f = f
  • Right identity: f . id = f
  • Associativity: (h . g) . f = h . (g . f)

Minimal complete definition

(.)

Methods

id :: forall (a :: k). Ob a => p a a Source Github #

Identity morphisms.

Defaults to objId for a category's own hom-profunctor, so a category that leaves Ob at its ObId default gets id for free.

default id :: forall (a :: k). (ObId a, p ~ ((~>) :: CAT k)) => p a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). p b c -> p a b -> p a c infixr 9 Source Github #

Composition (note the parameter order matches function composition).

Instances

Instances details
Promonad Simplex Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Simplex

Methods

id :: forall (a :: Nat). Ob a => Simplex a a Source Github #

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

Promonad ZX Source Github # 
Instance details

Defined in Proarrow.Category.Instance.ZX

Methods

id :: forall (a :: Nat). Ob a => ZX a a Source Github #

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

Promonad Booleans Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Bool

Methods

id :: forall (a :: BOOL). Ob a => Booleans a a Source Github #

(.) :: forall (b :: BOOL) (c :: BOOL) (a :: BOOL). Booleans b c -> Booleans a b -> Booleans a c Source Github #

Promonad Prepared Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Circuit

Methods

id :: forall (a :: PREPARED). Ob a => Prepared a a Source Github #

(.) :: forall (b :: PREPARED) (c :: PREPARED) (a :: PREPARED). Prepared b c -> Prepared a b -> Prepared a c Source Github #

Promonad Circuit Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Circuit

Methods

id :: forall (a :: Wires). Ob a => Circuit a a Source Github #

(.) :: forall (b :: Wires) (c :: Wires) (a :: Wires). Circuit b c -> Circuit a b -> Circuit a c Source Github #

Promonad (:-) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Constraint

Methods

id :: forall (a :: CONSTRAINT). Ob a => a :- a Source Github #

(.) :: forall (b :: CONSTRAINT) (c :: CONSTRAINT) (a :: CONSTRAINT). (b :- c) -> (a :- b) -> a :- c Source Github #

Promonad GTE Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Cost

Methods

id :: forall (a :: COST). Ob a => GTE a a Source Github #

(.) :: forall (b :: COST) (c :: COST) (a :: COST). GTE b c -> GTE a b -> GTE a c Source Github #

Promonad Diff Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Diff

Methods

id :: forall (a :: DIFF). Ob a => Diff a a Source Github #

(.) :: forall (b :: DIFF) (c :: DIFF) (a :: DIFF). Diff b c -> Diff a b -> Diff a c Source Github #

Promonad FinHask Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinHask

Methods

id :: forall (a :: FINHASK). Ob a => FinHask a a Source Github #

(.) :: forall (b :: FINHASK) (c :: FINHASK) (a :: FINHASK). FinHask b c -> FinHask a b -> FinHask a c Source Github #

Promonad FinRel Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinRel

Methods

id :: forall (a :: FINREL). Ob a => FinRel a a Source Github #

(.) :: forall (b :: FINREL) (c :: FINREL) (a :: FINREL). FinRel b c -> FinRel a b -> FinRel a c Source Github #

Promonad FinSet Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinSet

Methods

id :: forall (a :: FINSET). Ob a => FinSet a a Source Github #

(.) :: forall (b :: FINSET) (c :: FINSET) (a :: FINSET). FinSet b c -> FinSet a b -> FinSet a c Source Github #

Promonad Linear Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

id :: forall (a :: LINEAR). Ob a => Linear a a Source Github #

(.) :: forall (b :: LINEAR) (c :: LINEAR) (a :: LINEAR). Linear b c -> Linear a b -> Linear a c Source Github #

Promonad Pointed Source Github # 
Instance details

Defined in Proarrow.Category.Instance.PointedHask

Methods

id :: forall (a :: POINTED). Ob a => Pointed a a Source Github #

(.) :: forall (b :: POINTED) (c :: POINTED) (a :: POINTED). Pointed b c -> Pointed a b -> Pointed a c Source Github #

Promonad Simulator Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Simulator

Methods

id :: forall (a :: SIMULATOR). Ob a => Simulator a a Source Github #

(.) :: forall (b :: SIMULATOR) (c :: SIMULATOR) (a :: SIMULATOR). Simulator b c -> Simulator a b -> Simulator a c Source Github #

Promonad Zero Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Zero

Methods

id :: forall (a :: VOID). Ob a => Zero a a Source Github #

(.) :: forall (b :: VOID) (c :: VOID) (a :: VOID). Zero b c -> Zero a b -> Zero a c Source Github #

Promonad Dot Source Github # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

id :: forall (a :: DOT). Ob a => Dot a a Source Github #

(.) :: forall (b :: DOT) (c :: DOT) (a :: DOT). Dot b c -> Dot a b -> Dot a c Source Github #

Promonad Svg Source Github # 
Instance details

Defined in Proarrow.Tools.Diagrams.Svg

Methods

id :: forall (a :: SVG). Ob a => Svg a a Source Github #

(.) :: forall (b :: SVG) (c :: SVG) (a :: SVG). Svg b c -> Svg a b -> Svg a c Source Github #

Promonad WireId Source Github # 
Instance details

Defined in Proarrow.Tools.Diagrams.Svg

Methods

id :: forall (a :: W). Ob a => WireId a a Source Github #

(.) :: forall (b :: W) (c :: W) (a :: W). WireId b c -> WireId a b -> WireId a c Source Github #

Promonad Unit Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Unit

Methods

id :: forall (a :: ()). Ob a => Unit a a Source Github #

(.) :: forall (b :: ()) (c :: ()) (a :: ()). Unit b c -> Unit a b -> Unit a c Source Github #

Promonad SymRefl Source Github # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

id :: forall (a :: Symbol). Ob a => SymRefl a a Source Github #

(.) :: forall (b :: Symbol) (c :: Symbol) (a :: Symbol). SymRefl b c -> SymRefl a b -> SymRefl a c Source Github #

Monad m => Promonad (Kleisli m :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Arrow

Methods

id :: Ob a => Kleisli m a a Source Github #

(.) :: Kleisli m b c -> Kleisli m a b -> Kleisli m a c 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 #

Arrow arr => Promonad (Arr arr :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Arrow

Methods

id :: Ob a => Arr arr a a Source Github #

(.) :: Arr arr b c -> Arr arr a b -> Arr arr a c Source Github #

(VacuousOb k, Hom k ~ ((:~:) :: k -> k -> Type)) => Promonad ((:~:) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Core

Methods

id :: forall (a :: k). Ob a => a :~: a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). (b :~: c) -> (a :~: b) -> a :~: c Source Github #

CategoryOf k => Promonad (Id :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Identity

Methods

id :: forall (a :: k). Ob a => Id a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). Id b c -> Id a b -> Id a c Source Github #

Promonad (->) Source Github # 
Instance details

Defined in Proarrow.Core

Methods

id :: Ob a => a -> a Source Github #

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

Promonad p => Promonad (Fix p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Fix

Methods

id :: forall (a :: k). Ob a => Fix p a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). Fix p b c -> Fix p a b -> Fix p a c Source Github #

CategoryOf k => Promonad (TerminalProfunctor :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Terminal

Methods

id :: forall (a :: k). Ob a => TerminalProfunctor a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). TerminalProfunctor b c -> TerminalProfunctor a b -> TerminalProfunctor a c Source Github #

CategoryOf k => Promonad (Cont r :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Cont

Methods

id :: forall (a :: k). Ob a => Cont r a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). Cont r b c -> Cont r a b -> Cont r a c Source Github #

Profunctor p => Promonad (FreePromonad p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Free

Methods

id :: forall (a :: k). Ob a => FreePromonad p a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). FreePromonad p b c -> FreePromonad p a b -> FreePromonad p a c Source Github #

Promonad p => Promonad (WithPure p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Pure

Methods

id :: forall (a :: k). Ob a => WithPure p a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). WithPure p b c -> WithPure p a b -> WithPure p a c Source Github #

(Comonoid r, Monoidal k) => Promonad (Reader ('OP r) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

Methods

id :: forall (a :: k). Ob a => Reader ('OP r) a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). Reader ('OP r) b c -> Reader ('OP r) a b -> Reader ('OP r) a c Source Github #

(Monoid w, Monoidal k) => Promonad (Writer w :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Writer

Methods

id :: forall (a :: k). Ob a => Writer w a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). Writer w b c -> Writer w a b -> Writer w a c Source Github #

Adjunction p => Promonad (Adj p :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Adj

Methods

id :: Ob a => Adj p a a Source Github #

(.) :: Adj p b c -> Adj p a b -> Adj p a c Source Github #

Monad m => Promonad (Star (Prelude m) :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Star

Methods

id :: Ob a => Star (Prelude m) a a Source Github #

(.) :: Star (Prelude m) b c -> Star (Prelude m) a b -> Star (Prelude m) a c Source Github #

Promonad (Star []) Source Github #

The list monad without the Prelude wrapper, so that a Kleisli arrow of [] reads as the plain a -> [b].

Instance details

Defined in Proarrow.Profunctor.Instance.Star

Methods

id :: Ob a => Star [] a a Source Github #

(.) :: Star [] b c -> Star [] a b -> Star [] a c Source Github #

Promonad p => Promonad (FromProfunctor p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Functor

Methods

id :: forall (a :: k). Ob a => FromProfunctor p a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). FromProfunctor p b c -> FromProfunctor p a b -> FromProfunctor p a c Source Github #

(HasBinaryProducts k, Ob a) => Promonad (Corep (Product a) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Limit.BinaryProduct

Methods

id :: forall (a0 :: k). Ob a0 => Corep (Product a) a0 a0 Source Github #

(.) :: forall (b :: k) (c :: k) (a0 :: k). Corep (Product a) b c -> Corep (Product a) a0 b -> Corep (Product a) a0 c Source Github #

(Monoid c, CategoryOf k) => Promonad (HaskValue c :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.HaskValue

Methods

id :: forall (a :: k). Ob a => HaskValue c a a Source Github #

(.) :: forall (b :: k) (c0 :: k) (a :: k). HaskValue c b c0 -> HaskValue c a b -> HaskValue c a c0 Source Github #

Promonad p => Promonad (Wrapped p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Wrapped

Methods

id :: forall (a :: k). Ob a => Wrapped p a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). Wrapped p b c -> Wrapped p a b -> Wrapped p a c Source Github #

(FunctorForRep f, Promonad (Corep f)) => Promonad (RepCostar (Rep f) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

id :: forall (a :: k). Ob a => RepCostar (Rep f) a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). RepCostar (Rep f) b c -> RepCostar (Rep f) a b -> RepCostar (Rep f) a c Source Github #

Promonad m => Promonad (AsRelative m :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad

Methods

id :: forall (a :: k). Ob a => AsRelative m a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). AsRelative m b c -> AsRelative m a b -> AsRelative m a c Source Github #

(Comonoid r, Monoidal k, Strong (Tensor :: k -> (k, k) -> Type) p, Promonad p) => Promonad (ReaderT ('OP r) p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

Methods

id :: forall (a :: k). Ob a => ReaderT ('OP r) p a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). ReaderT ('OP r) p b c -> ReaderT ('OP r) p a b -> ReaderT ('OP r) p a c Source Github #

(Ob s, Monoidal k, Strong (Tensor :: k -> (k, k) -> Type) p, Promonad p) => Promonad (StateT s p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.State

Methods

id :: forall (a :: k). Ob a => StateT s p a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). StateT s p b c -> StateT s p a b -> StateT s p a c Source Github #

(Monoid w, Strong (Tensor :: k -> (k, k) -> Type) p, Promonad p) => Promonad (WriterT w p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Writer

Methods

id :: forall (a :: k). Ob a => WriterT w p a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). WriterT w p b c -> WriterT w p a b -> WriterT w p a c Source Github #

Proadjunction p q => Promonad (q :.: p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Adjunction

Methods

id :: forall (a :: k). Ob a => (q :.: p) a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). (q :.: p) b c -> (q :.: p) a b -> (q :.: p) a c Source Github #

(p ~ j, Profunctor p) => Promonad (Ran ('OP j) p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Ran

Methods

id :: forall (a :: k). Ob a => Ran ('OP j) p a a Source Github #

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

(p ~ j, Profunctor p) => Promonad (Rift ('OP j) p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Rift

Methods

id :: forall (a :: k). Ob a => Rift ('OP j) p a a Source Github #

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

Indexed k => Promonad (Codiscrete :: CODISCRETE k -> CODISCRETE k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Discrete

Methods

id :: forall (a :: CODISCRETE k). Ob a => Codiscrete a a Source Github #

(.) :: forall (b :: CODISCRETE k) (c :: CODISCRETE k) (a :: CODISCRETE k). Codiscrete b c -> Codiscrete a b -> Codiscrete a c Source Github #

Indexed k => Promonad (Discrete :: DISCRETE k -> DISCRETE k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Discrete

Methods

id :: forall (a :: DISCRETE k). Ob a => Discrete a a Source Github #

(.) :: forall (b :: DISCRETE k) (c :: DISCRETE k) (a :: DISCRETE k). Discrete b c -> Discrete a b -> Discrete a c Source Github #

CategoryOf k => Promonad (Fam :: FAM k -> FAM k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Fam

Methods

id :: forall (a :: FAM k). Ob a => Fam a a Source Github #

(.) :: forall (b :: FAM k) (c :: FAM k) (a :: FAM k). Fam b c -> Fam a b -> Fam a c Source Github #

TracedMonoidal k => Promonad (IntConstruction :: INT k -> INT k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.IntConstruction

Methods

id :: forall (a :: INT k). Ob a => IntConstruction a a Source Github #

(.) :: forall (b :: INT k) (c :: INT k) (a :: INT k). IntConstruction b c -> IntConstruction a b -> IntConstruction a c Source Github #

Num a => Promonad (Mat :: MatK a -> MatK a -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Mat

Methods

id :: forall (a0 :: MatK a). Ob a0 => Mat a0 a0 Source Github #

(.) :: forall (b :: MatK a) (c :: MatK a) (a0 :: MatK a). Mat b c -> Mat a0 b -> Mat a0 c Source Github #

CopyDiscard k => Promonad (Game :: GAME k -> GAME k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.OpenGame

Methods

id :: forall (a :: GAME k). Ob a => Game a a Source Github #

(.) :: forall (b :: GAME k) (c :: GAME k) (a :: GAME k). Game b c -> Game a b -> Game a c Source Github #

Promonad (LTE :: ORDINAL n -> ORDINAL n -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Ordinal

Methods

id :: forall (a :: ORDINAL n). Ob a => LTE a a Source Github #

(.) :: forall (b :: ORDINAL n) (c :: ORDINAL n) (a :: ORDINAL n). LTE b c -> LTE a b -> LTE a c Source Github #

HasPullbacks k => Promonad (Span :: SPAN k -> SPAN k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Span

Methods

id :: forall (a :: SPAN k). Ob a => Span a a Source Github #

(.) :: forall (b :: SPAN k) (c :: SPAN k) (a :: SPAN k). Span b c -> Span a b -> Span a c Source Github #

Scalar e => Promonad (TensorNetwork :: TNET e -> TNET e -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.TensorNetwork

Methods

id :: forall (a :: TNET e). Ob a => TensorNetwork a a Source Github #

(.) :: forall (b :: TNET e) (c :: TNET e) (a :: TNET e). TensorNetwork b c -> TensorNetwork a b -> TensorNetwork a c Source Github #

CategoryOf k => Promonad (Endo :: ENDO k -> ENDO k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.EndoProf

Methods

id :: forall (a :: ENDO k). Ob a => Endo a a Source Github #

(.) :: forall (b :: ENDO k) (c :: ENDO k) (a :: ENDO k). Endo b c -> Endo a b -> Endo a c Source Github #

Monoidal k => Promonad (Strictified :: [k] -> [k] -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Strictified

Methods

id :: forall (a :: [k]). Ob a => Strictified a a Source Github #

(.) :: forall (b :: [k]) (c :: [k]) (a :: [k]). Strictified b c -> Strictified a b -> Strictified a c Source Github #

Promonad c => Promonad (Op c :: OPPOSITE j -> OPPOSITE j -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Opposite

Methods

id :: forall (a :: OPPOSITE j). Ob a => Op c a a Source Github #

(.) :: forall (b :: OPPOSITE j) (c0 :: OPPOSITE j) (a :: OPPOSITE j). Op c b c0 -> Op c a b -> Op c a c0 Source Github #

Promonad p => Promonad (Rev p :: REV j -> REV j -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Rev

Methods

id :: forall (a :: REV j). Ob a => Rev p a a Source Github #

(.) :: forall (b :: REV j) (c :: REV j) (a :: REV j). Rev p b c -> Rev p a b -> Rev p a c Source Github #

Promonad p => Promonad (Coprod p :: COPROD j -> COPROD j -> Type) Source Github # 
Instance details

Defined in Proarrow.Colimit.BinaryCoproduct

Methods

id :: forall (a :: COPROD j). Ob a => Coprod p a a Source Github #

(.) :: forall (b :: COPROD j) (c :: COPROD j) (a :: COPROD j). Coprod p b c -> Coprod p a b -> Coprod p a c Source Github #

Promonad p => Promonad (Prod p :: PROD j -> PROD j -> Type) Source Github # 
Instance details

Defined in Proarrow.Limit.BinaryProduct

Methods

id :: forall (a :: PROD j). Ob a => Prod p a a Source Github #

(.) :: forall (b :: PROD j) (c :: PROD j) (a :: PROD j). Prod p b c -> Prod p a b -> Prod p a c Source Github #

Promonad p => Promonad (List p :: LIST j -> LIST j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.List

Methods

id :: forall (a :: LIST j). Ob a => List p a a Source Github #

(.) :: forall (b :: LIST j) (c :: LIST j) (a :: LIST j). List p b c -> List p a b -> List p a c Source Github #

CategoryOf k => Promonad (Cps :: CPS r -> CPS r -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Cps

Methods

id :: forall (a :: CPS r). Ob a => Cps a a Source Github #

(.) :: forall (b :: CPS r) (c :: CPS r) (a :: CPS r). Cps b c -> Cps a b -> Cps a c Source Github #

(HasPushouts k, Alternative f) => Promonad (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

id :: forall (a :: DECCOSPAN f). Ob a => DecCospan a a Source Github #

(.) :: forall (b :: DECCOSPAN f) (c :: DECCOSPAN f) (a :: DECCOSPAN f). DecCospan b c -> DecCospan a b -> DecCospan a c Source Github #

Promonad p => Promonad (Kleisli :: KLEISLI p -> KLEISLI p -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Kleisli

Methods

id :: forall (a :: KLEISLI p). Ob a => Kleisli a a Source Github #

(.) :: forall (b :: KLEISLI p) (c :: KLEISLI p) (a :: KLEISLI p). Kleisli b c -> Kleisli a b -> Kleisli a c Source Github #

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 #

(CategoryOf k, Rewrite p) => Promonad (Paths :: PATHS p -> PATHS p -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Paths

Methods

id :: forall (a :: PATHS p). Ob a => Paths a a Source Github #

(.) :: forall (b :: PATHS p) (c :: PATHS p) (a :: PATHS p). Paths b c -> Paths a b -> Paths a c Source Github #

(InternalIn ik FINSET, SNatI (NumObs ik)) => Promonad (Internal :: INTERNAL ik -> INTERNAL ik -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Internal

Methods

id :: forall (a :: INTERNAL ik). Ob a => Internal a a Source Github #

(.) :: forall (b :: INTERNAL ik) (c :: INTERNAL ik) (a :: INTERNAL ik). Internal b c -> Internal a b -> Internal a c Source Github #

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

Defined in Proarrow.Category.Instance.Prof

Methods

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

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

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 #

Promonad p => Promonad (Sub p :: SUBCAT ob -> SUBCAT ob -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Sub

Methods

id :: forall (a :: SUBCAT ob). Ob a => Sub p a a Source Github #

(.) :: forall (b :: SUBCAT ob) (c :: SUBCAT ob) (a :: SUBCAT ob). Sub p b c -> Sub p a b -> Sub p a c 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 #

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

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

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

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

(Comonoid r, Monoidal k) => Promonad (Star (ReaderT ('OP r)) :: (k +-> k) -> (k +-> k) -> Type) Source Github #

ReaderT is a monad on profunctors, i.e. we have p ~> ReaderT p and ReaderT (ReaderT p) ~> ReaderT p.

Instance details

Defined in Proarrow.Promonad.Reader

Methods

id :: forall (a :: k +-> k). Ob a => Star (ReaderT ('OP r)) a a Source Github #

(.) :: forall (b :: k +-> k) (c :: k +-> k) (a :: k +-> k). Star (ReaderT ('OP r)) b c -> Star (ReaderT ('OP r)) a b -> Star (ReaderT ('OP r)) a c Source Github #

(Monoid w, Monoidal k) => Promonad (Star (WriterT w) :: (k +-> k) -> (k +-> k) -> Type) Source Github #

WriterT is a monad on profunctors, with p ~> WriterT p and WriterT (WriterT p) ~> WriterT p.

Instance details

Defined in Proarrow.Promonad.Writer

Methods

id :: forall (a :: k +-> k). Ob a => Star (WriterT w) a a Source Github #

(.) :: forall (b :: k +-> k) (c :: k +-> k) (a :: k +-> k). Star (WriterT w) b c -> Star (WriterT w) a b -> Star (WriterT w) a c Source Github #

Procomonad j => Promonad (Star (Ran ('OP j) :: (i +-> k) -> k -> i -> Type) :: (k -> i -> Type) -> (i +-> k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Ran

Methods

id :: forall (a :: k -> i -> Type). Ob a => Star (Ran ('OP j) :: (i +-> k) -> k -> i -> Type) a a Source Github #

(.) :: forall (b :: k -> i -> Type) (c :: k -> i -> Type) (a :: k -> i -> Type). Star (Ran ('OP j) :: (i +-> k) -> k -> i -> Type) b c -> Star (Ran ('OP j) :: (i +-> k) -> k -> i -> Type) a b -> Star (Ran ('OP j) :: (i +-> k) -> k -> i -> Type) a c Source Github #

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

Defined in Proarrow.Profunctor.Instance.Star

Methods

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

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

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

Defined in Proarrow.Profunctor.Instance.Coyoneda

Methods

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

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

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

Defined in Proarrow.Profunctor.Instance.Yoneda

Methods

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

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

Procomonad j2 => Promonad (Star (Rift ('OP j2) :: (j1 +-> k) -> k -> j1 -> Type) :: (k -> j1 -> Type) -> (j1 +-> k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Rift

Methods

id :: forall (a :: k -> j1 -> Type). Ob a => Star (Rift ('OP j2) :: (j1 +-> k) -> k -> j1 -> Type) a a Source Github #

(.) :: forall (b :: k -> j1 -> Type) (c :: k -> j1 -> Type) (a :: k -> j1 -> Type). Star (Rift ('OP j2) :: (j1 +-> k) -> k -> j1 -> Type) b c -> Star (Rift ('OP j2) :: (j1 +-> k) -> k -> j1 -> Type) a b -> Star (Rift ('OP j2) :: (j1 +-> k) -> k -> j1 -> Type) a c Source Github #

Promonad (Star (FreePromonad :: CAT k -> k -> k -> Type) :: (k -> k -> Type) -> CAT k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Free

Methods

id :: forall (a :: k -> k -> Type). Ob a => Star (FreePromonad :: CAT k -> k -> k -> Type) a a Source Github #

(.) :: forall (b :: k -> k -> Type) (c :: k -> k -> Type) (a :: k -> k -> Type). Star (FreePromonad :: CAT k -> k -> k -> Type) b c -> Star (FreePromonad :: CAT k -> k -> k -> Type) a b -> Star (FreePromonad :: CAT k -> k -> k -> Type) a c Source Github #

Monoidal k => Promonad (Star (Ap :: (k -> Type) -> k -> Type) :: (k -> Type) -> (k -> Type) -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

id :: forall (a :: k -> Type). Ob a => Star (Ap :: (k -> Type) -> k -> Type) a a Source Github #

(.) :: forall (b :: k -> Type) (c :: k -> Type) (a :: k -> Type). Star (Ap :: (k -> Type) -> k -> Type) b c -> Star (Ap :: (k -> Type) -> k -> Type) a b -> Star (Ap :: (k -> Type) -> k -> Type) a c Source Github #

Monoid m => Promonad (Mon :: MONOID m -> MONOID m -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Monoid

Methods

id :: forall (a :: MONOID m). Ob a => Mon a a Source Github #

(.) :: forall (b :: MONOID m) (c :: MONOID m) (a :: MONOID m). Mon b c -> Mon a b -> Mon a c Source Github #

(Promonad p, Promonad q) => Promonad (p :++: q :: COPRODUCT j1 j2 -> COPRODUCT j1 j2 -> Type) Source Github #

The coproduct of two promonads.

Instance details

Defined in Proarrow.Category.Instance.Coproduct

Methods

id :: forall (a :: COPRODUCT j1 j2). Ob a => (p :++: q) a a Source Github #

(.) :: forall (b :: COPRODUCT j1 j2) (c :: COPRODUCT j1 j2) (a :: COPRODUCT j1 j2). (p :++: q) b c -> (p :++: q) a b -> (p :++: q) a c Source Github #

(Promonad p, Promonad q) => Promonad (p :**: q :: (j1, j2) -> (j1, j2) -> Type) Source Github #

The product promonad of promonads p and q.

Instance details

Defined in Proarrow.Category.Instance.Product

Methods

id :: forall (a :: (j1, j2)). Ob a => (p :**: q) a a Source Github #

(.) :: forall (b :: (j1, j2)) (c :: (j1, j2)) (a :: (j1, j2)). (p :**: q) b c -> (p :**: q) a b -> (p :**: q) a c Source Github #

Profunctor p => Promonad (Collage :: COLLAGE p -> COLLAGE p -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Collage

Methods

id :: forall (a :: COLLAGE p). Ob a => Collage a a Source Github #

(.) :: forall (b :: COLLAGE p) (c :: COLLAGE p) (a :: COLLAGE p). Collage b c -> Collage a b -> Collage a c Source Github #

Adjunction adj => Promonad (Duploid :: DUPLOID adj -> DUPLOID adj -> Type) Source Github #

ATTENTION: a duploid is not associative, so not really a promonad/category!

Instance details

Defined in Proarrow.Category.Instance.Duploid

Methods

id :: forall (a :: DUPLOID adj). Ob a => Duploid a a Source Github #

(.) :: forall (b :: DUPLOID adj) (c :: DUPLOID adj) (a :: DUPLOID adj). Duploid b c -> Duploid a b -> Duploid a c Source Github #

Promonad (Free :: FREE cs p -> FREE cs p -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Free

Methods

id :: forall (a :: FREE cs p). Ob a => Free a a Source Github #

(.) :: forall (b :: FREE cs p) (c :: FREE cs p) (a :: FREE cs p). Free b c -> Free a b -> Free a c Source Github #

ThinProfunctor p => Promonad (Graph :: GRAPH p -> GRAPH p -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Graph

Methods

id :: forall (a :: GRAPH p). Ob a => Graph a a Source Github #

(.) :: forall (b :: GRAPH p) (c :: GRAPH p) (a :: GRAPH p). Graph b c -> Graph a b -> Graph a c Source Github #

(CategoryOf j, CategoryOf k) => Promonad (Optic_ :: OPTIC j k c -> OPTIC j k c -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic

Methods

id :: forall (a :: OPTIC j k c). Ob a => Optic_ a a Source Github #

(.) :: forall (b :: OPTIC j k c) (c0 :: OPTIC j k c) (a :: OPTIC j k c). Optic_ b c0 -> Optic_ a b -> Optic_ a c0 Source Github #

class Profunctor p => Procomonad (p :: k +-> k) where Source Github #

Instances

Instances details
CategoryOf k => Procomonad (Fold :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Fold

Methods

proextract :: (Fold :: k -> k -> Type) :~> ((~>) :: CAT k) Source Github #

produplicate :: (Fold :: k -> k -> Type) :~> ((Fold :: k -> k -> Type) :.: (Fold :: k -> k -> Type)) Source Github #

CategoryOf k => Procomonad (Id :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad

Methods

proextract :: (Id :: k -> k -> Type) :~> ((~>) :: CAT k) Source Github #

produplicate :: (Id :: k -> k -> Type) :~> ((Id :: k -> k -> Type) :.: (Id :: k -> k -> Type)) Source Github #

(Monoid r, Monoidal k) => Procomonad (Reader ('OP r) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

(Comonoid w, Monoidal k) => Procomonad (Writer w :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Writer

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

Defined in Proarrow.Profunctor.Instance.Costar

(Procomonad p, Procomonad q, Monoidal k) => Procomonad (Day p q :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Day

Methods

proextract :: Day p q :~> ((~>) :: CAT k) Source Github #

produplicate :: Day p q :~> (Day p q :.: Day p q) Source Github #

Proadjunction p q => Procomonad (p :.: q :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Adjunction

Methods

proextract :: (p :.: q) :~> ((~>) :: CAT k) Source Github #

produplicate :: (p :.: q) :~> ((p :.: q) :.: (p :.: q)) Source Github #

type Monad (m :: CAT j) = (Promonad m, Representable m) Source Github #

A representable promonad is a monad on objects: it acts as the functor m % -, with return and bind.

return :: forall {j} (m :: CAT j) (a :: j). (Monad m, Ob a) => a ~> (m % a) Source Github #

The unit of the monad m.

bind :: forall {j} (m :: CAT j) (b :: j) (a :: j). (Monad m, Ob b) => (a ~> (m % b)) -> (m % a) ~> (m % b) Source Github #

Kleisli extension: run a Kleisli arrow under m.

type Comonad (w :: CAT j) = (Promonad w, Corepresentable w) Source Github #

Dually, a corepresentable promonad is a comonad on objects, acting as w %% -, with extract and extend.

extract :: forall {k} (w :: CAT k) (a :: k). (Comonad w, Ob a) => (w %% a) ~> a Source Github #

The counit of the comonad w.

extend :: forall {j} (w :: CAT j) (a :: j) (b :: j). (Comonad w, Ob a) => ((w %% a) ~> b) -> (w %% a) ~> (w %% b) Source Github #

CoKleisli extension: run a coKleisli arrow under w.

newtype AsRelative (m :: k +-> i) (a :: i) (b :: k) Source Github #

A Monad or Comonad seen as a relative (co)monad along Id.

The wrapper is needed: a direct RelativeMonad Id m instance would unify at j = Id with carrier-specific ones such as the codensity monad's, with neither more specific, so no overlap pragma could order them.

Constructors

AsRelative 

Fields

Instances

Instances details
Comonad w => RelativeComonad (Id :: i -> i -> Type) (AsRelative w :: i -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad

Methods

relExtract :: forall (a :: i). Ob a => Id (AsRelative w %% a) a Source Github #

relExtend :: forall (a :: i) (b :: i). Ob a => Id (AsRelative w %% a) b -> (AsRelative w %% a) ~> (AsRelative w %% b) Source Github #

Monad m => RelativeMonad (Id :: i -> i -> Type) (AsRelative m :: i -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad

Methods

relReturn :: forall (a :: i). Ob a => Id a (AsRelative m % a) Source Github #

relBind :: forall (b :: i) (a :: i). Ob b => Id a (AsRelative m % b) -> (AsRelative m % a) ~> (AsRelative m % b) Source Github #

Profunctor m => Profunctor (AsRelative m :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad

Methods

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

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

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

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

Corepresentable m => Corepresentable (AsRelative m :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad

Methods

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

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

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

corepUniv :: forall (a :: k). Ob a => AsRelative m a (AsRelative m %% a) Source Github #

Representable m => Representable (AsRelative m :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad

Methods

index :: forall (a :: k) (b :: j). AsRelative m a b -> a ~> (AsRelative m % b) Source Github #

tabulate :: forall (b :: j) (a :: k). Ob b => (a ~> (AsRelative m % b)) -> AsRelative m a b Source Github #

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (AsRelative m % a) ~> (AsRelative m % b) Source Github #

repUniv :: forall (a :: j). Ob a => AsRelative m (AsRelative m % a) a Source Github #

Promonad m => Promonad (AsRelative m :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad

Methods

id :: forall (a :: k). Ob a => AsRelative m a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). AsRelative m b c -> AsRelative m a b -> AsRelative m a c Source Github #

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

Defined in Proarrow.Promonad

type (AsRelative m :: k -> j -> Type) %% (a :: k) = m %% a
type (AsRelative m :: k -> j -> Type) % (a :: j) Source Github # 
Instance details

Defined in Proarrow.Promonad

type (AsRelative m :: k -> j -> Type) % (a :: j) = m % a

class (Representable m, Profunctor j) => RelativeMonad (j :: i +-> k) (m :: k +-> i) where Source Github #

Methods

relReturn :: forall (a :: k). Ob a => j a (m % a) Source Github #

relBind :: forall (b :: k) (a :: k). Ob b => j a (m % b) -> (m % a) ~> (m % b) Source Github #

Instances

Instances details
(Corepresentable g, Corepresentable f, Profunctor j, f ~ (g |> j)) => RelativeMonad (j :: k1 +-> i) (CorepStar g :.: CorepStar f :: k1 -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Ran

Methods

relReturn :: forall (a :: i). Ob a => j a ((CorepStar g :.: CorepStar f) % a) Source Github #

relBind :: forall (b :: i) (a :: i). Ob b => j a ((CorepStar g :.: CorepStar f) % b) -> ((CorepStar g :.: CorepStar f) % a) ~> ((CorepStar g :.: CorepStar f) % b) Source Github #

Monad m => RelativeMonad (Id :: i -> i -> Type) (AsRelative m :: i -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad

Methods

relReturn :: forall (a :: i). Ob a => Id a (AsRelative m % a) Source Github #

relBind :: forall (b :: i) (a :: i). Ob b => Id a (AsRelative m % b) -> (AsRelative m % a) ~> (AsRelative m % b) Source Github #

type RelAlgebra (j1 :: j -> k -> Type) (m :: j +-> k) (a :: j) (b :: k) = j1 a b -> (m % a) ~> b Source Github #

class (Corepresentable w, Profunctor j) => RelativeComonad (j :: i +-> k) (w :: k +-> i) where Source Github #

Methods

relExtract :: forall (a :: i). Ob a => j (w %% a) a Source Github #

relExtend :: forall (a :: i) (b :: i). Ob a => j (w %% a) b -> (w %% a) ~> (w %% b) Source Github #

Instances

Instances details
(Representable g, Representable f, Profunctor j, f ~ (j <| g)) => RelativeComonad (j :: k2 +-> i) (RepCostar f :.: RepCostar g :: k2 -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Rift

Methods

relExtract :: forall (a :: k2). Ob a => j ((RepCostar f :.: RepCostar g) %% a) a Source Github #

relExtend :: forall (a :: k2) (b :: k2). Ob a => j ((RepCostar f :.: RepCostar g) %% a) b -> ((RepCostar f :.: RepCostar g) %% a) ~> ((RepCostar f :.: RepCostar g) %% b) Source Github #

Comonad w => RelativeComonad (Id :: i -> i -> Type) (AsRelative w :: i -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad

Methods

relExtract :: forall (a :: i). Ob a => Id (AsRelative w %% a) a Source Github #

relExtend :: forall (a :: i) (b :: i). Ob a => Id (AsRelative w %% a) b -> (AsRelative w %% a) ~> (AsRelative w %% b) Source Github #

type RelCoalgebra (j :: k -> k1 -> Type) (w :: k +-> k1) (a :: k) (b :: k1) = j a b -> a ~> (w %% b) Source Github #

Orphan instances

ProLaws (Promonad :: CAT j -> Constraint) Source Github #

id is a unit for composition, which is associative, and both are natural. Elements that start where another one ends are made from the drawn ones with lmap and an arbitrary arrow.

Instance details