proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Promonad.Reader

Documentation

data Reader (r :: OPPOSITE k) (a :: k) (b :: k) where Source Github #

Constructors

Reader :: forall {k} (a :: k) (b :: k) (r1 :: k). Ob a => ((r1 ** a) ~> b) -> Reader ('OP r1) a b 

Instances

Instances details
(Ob r, SelfAction k) => Strong k (Reader ('OP r) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

Methods

act :: forall (a :: k) (b :: k) (x :: k) (y :: k). (a ~> b) -> Reader ('OP r) x y -> Reader ('OP r) (Act a x) (Act b y) Source Github #

(Comonoid r, SelfAction k, SymMonoidal k) => MonoidalProfunctor (Reader ('OP r) :: k -> k -> Type) Source Github #

Note: This is only premonoidal, not monoidal, unless the comonoid is cocommutative.

Instance details

Defined in Proarrow.Promonad.Reader

Methods

par0 :: Reader ('OP r) (Unit :: k) (Unit :: k) Source Github #

par :: forall (x1 :: k) (x2 :: k) (y1 :: k) (y2 :: k). Reader ('OP r) x1 x2 -> Reader ('OP r) y1 y2 -> Reader ('OP r) (x1 ** y1) (x2 ** y2) Source Github #

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

Defined in Proarrow.Promonad.Reader

Methods

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

(\\) :: forall (a :: k) (b :: k) r0. ((Ob a, Ob b) => r0) -> Reader ('OP r) a b -> r0 Source Github #

(Ob r, Monoidal k) => Corepresentable (Reader ('OP r) :: k -> k -> Type) Source Github #

The coreader comonad given the Promonad instance. Together with the Representable instance this gives the curry/uncurry adjunction.

Instance details

Defined in Proarrow.Promonad.Reader

Methods

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

cotabulate :: forall (a :: k) (b :: k). Ob a => ((Reader ('OP r) %% a) ~> b) -> Reader ('OP r) a b Source Github #

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

(Ob r, SymMonoidal k, Closed k) => Representable (Reader ('OP r) :: k -> k -> Type) Source Github #

The reader monad given the Promonad instance.

Instance details

Defined in Proarrow.Promonad.Reader

Methods

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

tabulate :: forall (b :: k) (a :: k). Ob b => (a ~> (Reader ('OP r) % b)) -> Reader ('OP r) a b Source Github #

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

(Ob r, Monoidal k) => Proadjunction (Writer r :: k -> k -> Type) (Reader ('OP r) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

Methods

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

counit :: (Writer r :.: Reader ('OP r)) :~> ((~>) :: CAT k) Source Github #

(SelfAction k, Ob a) => IsReader (Reader ('OP a) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Equipment.Stateful

Associated Types

type WithWriter (Reader ('OP a) :: k -> k -> Type) 
Instance details

Defined in Proarrow.Category.Equipment.Stateful

type WithWriter (Reader ('OP a) :: k -> k -> Type) = Writer a
(Comonoid r, SelfAction k) => Cotraversable (Reader ('OP r) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

Methods

cotraverse :: forall (p :: k +-> k). (DistributiveProfunctor p, Strong k p, SelfAction k) => (p :.: Reader ('OP r)) :~> (Reader ('OP r) :.: p) 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 r, Monoidal k) => Procomonad (Reader ('OP r) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

Methods

extract :: Reader ('OP r) :~> ((~>) :: CAT k) Source Github #

duplicate :: Reader ('OP r) :~> (Reader ('OP r) :.: Reader ('OP r)) Source Github #

Monoidal k => Functor (Reader :: OPPOSITE k -> k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

Methods

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

type (Reader ('OP r) :: k -> k -> Type) %% (a :: k) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

type (Reader ('OP r) :: k -> k -> Type) %% (a :: k) = r ** a
type (Reader ('OP r) :: k -> k -> Type) % (a :: k) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

type (Reader ('OP r) :: k -> k -> Type) % (a :: k) = r ~~> a
type WithWriter (Reader ('OP a) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Equipment.Stateful

type WithWriter (Reader ('OP a) :: k -> k -> Type) = Writer a

dayCounit :: forall {k} (r :: k). (Ob r, Cartesian k) => Day (Writer r) (Reader ('OP r)) ~> ((~>) :: CAT k) Source Github #

readerComp :: forall {k} (r :: k) (s :: k). (SymMonoidal k, Ob r, Ob s) => (Reader ('OP r) :.: Reader ('OP s)) ~> Reader ('OP (r ** s)) Source Github #

readerDay :: forall {k} (r :: k) (s :: k). (SymMonoidal k, Ob r, Ob s) => Day (Reader ('OP r)) (Reader ('OP s)) ~> Reader ('OP (r ** s)) Source Github #