proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Profunctor.Cofree

Description

Cofree constructions, dual to Proarrow.Profunctor.Free: HasCofree captures the object constraints ob whose forgetful functor has a right adjoint, with Cofree ob the cofree object, lower the counit and unfoldMap the universal property.

Documentation

class (CategoryOf k, forall (a :: k). Ob a => ob (Cofree ob a)) => HasCofree (ob :: OB k) where Source Github #

Associated Types

type Cofree (ob :: OB k) (a :: k) :: k Source Github #

Methods

lower :: forall (a :: k). Ob a => Cofree ob a ~> a Source Github #

unfoldMap :: forall (a :: k) (b :: k). ob a => (a ~> b) -> a ~> Cofree ob b Source Github #

Instances

Instances details
HasCofree (Profunctor :: (j +-> k) -> Constraint) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Yoneda

Methods

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

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

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

Defined in Proarrow.Profunctor.Instance.PastroTambara

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 #

section :: forall {k} (ob :: OB k) (a :: k). (HasCofree ob, ob a, Ob a) => a ~> Cofree ob a Source Github #

cofreeMap :: forall {k} (ob :: OB k) (a :: k) (b :: k). HasCofree ob => (a ~> b) -> Cofree ob a ~> Cofree ob b Source Github #

cofreeComp :: forall {k} (ob :: OB k) (a :: k) (b :: k) (c :: k). (HasCofree ob, Ob a) => (Cofree ob b ~> c) -> (Cofree ob a ~> b) -> Cofree ob a ~> c Source Github #

Orphan instances

HasCofree ob => Representable (Corep (Forget ob) :: SUBCAT ob -> k -> Type) Source Github #

By creating the right adjoint to the forgetful functor, we obtain the forgetful-cofree adjunction.

Instance details

Methods

index :: forall (a :: SUBCAT ob) (b :: k). Corep (Forget ob) a b -> a ~> (Corep (Forget ob) % b) Source Github #

tabulate :: forall (b :: k) (a :: SUBCAT ob). Ob b => (a ~> (Corep (Forget ob) % b)) -> Corep (Forget ob) a b Source Github #

repMap :: forall (a :: k) (b :: k). (a ~> b) -> (Corep (Forget ob) % a) ~> (Corep (Forget ob) % b) Source Github #

repUniv :: forall (a :: k). Ob a => Corep (Forget ob) (Corep (Forget ob) % a) a Source Github #