proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Profunctor.Cofree

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

Defined in Proarrow.Profunctor.Cofree

Associated Types

type Cofree Test (a :: Type) 
Instance details

Defined in Proarrow.Profunctor.Cofree

type Cofree Test (a :: Type) = (Int, a)

Methods

lower :: Ob a => Cofree Test a ~> a Source Github #

unfoldMap :: Test a => (a ~> b) -> a ~> Cofree Test b Source Github #

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

Defined in Proarrow.Profunctor.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 #

(MonoidalAction m j, MonoidalAction m k) => HasCofree (Strong m :: (j +-> k) -> Constraint) Source Github # 
Instance details

Defined in Proarrow.Profunctor.PastroTambara

Methods

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

unfoldMap :: forall (a :: j +-> k) (b :: j +-> k). Strong m a => (a ~> b) -> a ~> Cofree (Strong m :: (j +-> k) -> Constraint) 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 #

class Test a where Source Github #

Methods

test :: a -> Int Source Github #

Instances

Instances details
Test (Int, a) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Cofree

Methods

test :: (Int, a) -> Int 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 #

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

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

Methods

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

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