proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Profunctor.Instance.PastroTambara

Description

Pastro and Tambara are the free and cofree Prostrong profunctors for an optic flavor w (the HasFree and HasCofree instances for Prostrong w): Pastro w r sandwiches r between an existential witness pair, while Tambara w r provides strength against every witness pair at once.

Synopsis

Documentation

data Pastro (w :: FLAVOR j k) (r :: j +-> k) (a :: k) (b :: j) where Source Github #

The free Prostrong profunctor for the flavor w: the profunctor r sandwiched between an existential w-witness pair.

Constructors

Pastro :: forall {k} {j} (p :: k +-> k) (q :: j +-> j) (w :: FLAVOR j k) (r :: j +-> k) (a :: k) (b :: j). (w p q, Profunctor p, Profunctor q) => ((p :.: r) :.: q) a b -> Pastro w r a b 

Instances

Instances details
(Flavor w, Profunctor p) => Prostrong (w :: FLAVOR j k) (Pastro w p :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

proact :: forall (f :: k +-> k) (g :: j +-> j). (w f g, Profunctor f, Profunctor g) => ((f :.: Pastro w p) :.: g) :~> Pastro w p Source Github #

(CategoryOf j, CategoryOf k, Profunctor p) => Profunctor (Pastro t p :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

dimap :: forall (c :: k) (a :: k) (b :: j) (d :: j). (c ~> a) -> (b ~> d) -> Pastro t p a b -> Pastro t p c d Source Github #

lmap :: forall (c :: k) (a :: k) (b :: j). (c ~> a) -> Pastro t p a b -> Pastro t p c b Source Github #

rmap :: forall (b :: j) (d :: j) (a :: k). (b ~> d) -> Pastro t p a b -> Pastro t p a d Source Github #

(\\) :: forall (a :: k) (b :: j) r. ((Ob a, Ob b) => r) -> Pastro t p a b -> r Source Github #

Functor (Pastro t :: (j +-> k) -> k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

map :: forall (a :: j +-> k) (b :: j +-> k). (a ~> b) -> Pastro t a ~> Pastro t b 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 #

pastro :: forall {j} {k} (w :: FLAVOR j k) (p :: j +-> k). (Profunctor p, Flavor w) => p :~> Pastro w p Source Github #

unpastro :: forall {j} {k} (w :: FLAVOR j k) (p :: j +-> k). Prostrong w p => Pastro w p :~> p Source Github #

fromExOptic :: forall {j} {k} (w :: FLAVOR j k) (a :: k) (b :: j). (CategoryOf j, CategoryOf k) => ExOptic w a b :~> Pastro w (Yo a ('OP b)) Source Github #

data Tambara (w :: FLAVOR j k) (r :: j +-> k) (a :: k) (b :: j) where Source Github #

The cofree Prostrong profunctor for the flavor w: strength against every w-witness pair at once.

Constructors

Tambara :: forall {j} {k} (w :: FLAVOR j k) (r :: j +-> k) (a :: k) (b :: j). (Ob a, Ob b) => (forall (p :: k +-> k) (q :: j +-> j). (w p q, Profunctor p, Profunctor q) => ((q |> r) <| p) a b) -> Tambara w r a b 

Instances

Instances details
(Flavor w, Profunctor p) => Prostrong (w :: FLAVOR j k) (Tambara w p :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

proact :: forall (f :: k +-> k) (g :: j +-> j). (w f g, Profunctor f, Profunctor g) => ((f :.: Tambara w p) :.: g) :~> Tambara w p Source Github #

Profunctor p => Profunctor (Tambara w p :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

dimap :: forall (c :: k) (a :: k) (b :: j) (d :: j). (c ~> a) -> (b ~> d) -> Tambara w p a b -> Tambara w p c d Source Github #

lmap :: forall (c :: k) (a :: k) (b :: j). (c ~> a) -> Tambara w p a b -> Tambara w p c b Source Github #

rmap :: forall (b :: j) (d :: j) (a :: k). (b ~> d) -> Tambara w p a b -> Tambara w p a d Source Github #

(\\) :: forall (a :: k) (b :: j) r. ((Ob a, Ob b) => r) -> Tambara w p a b -> r Source Github #

Functor (Tambara w :: (j +-> k) -> k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

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

Corepresentable (Star (Tambara w) :: (k -> j -> Type) -> (j +-> k) -> Type) Source Github #

Pastro t ⊣ Tambara t

Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

coindex :: forall (a :: j +-> k) (b :: j +-> k). Star (Tambara w) a b -> (Star (Tambara w) %% a) ~> b Source Github #

cotabulate :: forall (a :: j +-> k) (b :: j +-> k). Ob a => ((Star (Tambara w) %% a) ~> b) -> Star (Tambara w) a b Source Github #

corepMap :: forall (a :: j +-> k) (b :: j +-> k). (a ~> b) -> (Star (Tambara w) %% a) ~> (Star (Tambara w) %% b) Source Github #

corepUniv :: forall (a :: j +-> k). Ob a => Star (Tambara w) a (Star (Tambara w) %% a) 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 #

type (Star (Tambara w) :: (k -> j -> Type) -> (j +-> k) -> Type) %% (p :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

type (Star (Tambara w) :: (k -> j -> Type) -> (j +-> k) -> Type) %% (p :: k -> j -> Type) = Pastro w p

mkTambara :: forall k (a :: k) j (b :: j) w r. (Ob a, Ob b) => (forall (p :: k +-> k) (q :: j +-> j) (x :: k) (y :: j). (w p q, Profunctor p, Profunctor q) => p x a -> q b y -> r x y) -> Tambara w r a b Source Github #

runTambara :: forall {k} {j} (w :: (k +-> k) -> (j +-> j) -> Constraint) p q (a :: k) (x :: k) (b :: j) (y :: j) r. (w p q, Profunctor p, Profunctor q) => (Ob a => p x a) -> (Ob b => q b y) -> Tambara w r a b -> r x y Source Github #

tambara :: forall {j} {k} (w :: FLAVOR j k) (p :: j +-> k). Prostrong w p => p :~> Tambara w p Source Github #

untambara :: forall {j} {k} (w :: FLAVOR j k) (p :: j +-> k). (Profunctor p, Flavor w) => Tambara w p :~> p Source Github #

Orphan instances

Flavor w => HasCofree (Prostrong w :: (j +-> k) -> Constraint) Source Github # 
Instance details

Methods

lower :: forall (a :: j +-> k). Ob a => Cofree (Prostrong w) a ~> a Source Github #

unfoldMap :: forall (a :: j +-> k) (b :: j +-> k). Prostrong w a => (a ~> b) -> a ~> Cofree (Prostrong w) b Source Github #

Flavor w => HasFree (Prostrong w :: (j +-> k) -> Constraint) Source Github # 
Instance details

Methods

lift :: forall (a :: j +-> k). Ob a => a ~> Free (Prostrong w) a Source Github #

foldMap :: forall (b :: j +-> k) (a :: j +-> k). Prostrong w b => (a ~> b) -> Free (Prostrong w) a ~> b Source Github #