proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Profunctor.Free

Documentation

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

Associated Types

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

Methods

lift :: forall (a :: k). Ob a => a ~> Free ob a Source Github #

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

Instances

Instances details
HasFree Monoid Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Associated Types

type Free Monoid (a :: Type) 
Instance details

Defined in Proarrow.Profunctor.Free

type Free Monoid (a :: Type) = [a]

Methods

lift :: Ob a => a ~> Free Monoid a Source Github #

foldMap :: Monoid b => (a ~> b) -> Free Monoid a ~> b Source Github #

HasFree Semigroup Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Associated Types

type Free Semigroup (a :: Type) 
Instance details

Defined in Proarrow.Profunctor.Free

type Free Semigroup (a :: Type) = NonEmpty a

Methods

lift :: Ob a => a ~> Free Semigroup a Source Github #

foldMap :: Semigroup b => (a ~> b) -> Free Semigroup a ~> b Source Github #

HasFree (Promonad :: (k +-> k) -> Constraint) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

lift :: forall (a :: k +-> k). Ob a => a ~> Free (Promonad :: (k +-> k) -> Constraint) a Source Github #

foldMap :: forall (b :: k +-> k) (a :: k +-> k). Promonad b => (a ~> b) -> Free (Promonad :: (k +-> k) -> Constraint) a ~> b Source Github #

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

Defined in Proarrow.Profunctor.Coyoneda

Methods

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

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

Monoidal k => HasFree (Applicative :: (k -> Type) -> Constraint) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

lift :: forall (a :: k -> Type). Ob a => a ~> Free (Applicative :: (k -> Type) -> Constraint) a Source Github #

foldMap :: forall (b :: k -> Type) (a :: k -> Type). Applicative b => (a ~> b) -> Free (Applicative :: (k -> Type) -> Constraint) a ~> b Source Github #

HasFree (On Monoid Semigroup) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Associated Types

type Free (On Monoid Semigroup) ('SUB a :: SUBCAT Semigroup) 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

lift :: forall (a :: SUBCAT Semigroup). Ob a => a ~> Free (On Monoid Semigroup) a Source Github #

foldMap :: forall (b :: SUBCAT Semigroup) (a :: SUBCAT Semigroup). On Monoid Semigroup b => (a ~> b) -> Free (On Monoid Semigroup) a ~> b Source Github #

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

Defined in Proarrow.Profunctor.PastroTambara

Methods

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

foldMap :: forall (b :: j +-> k) (a :: j +-> k). Strong m b => (a ~> b) -> Free (Strong m :: (j +-> k) -> Constraint) a ~> b Source Github #

retract :: forall {k} (ob :: OB k) (a :: k). (HasFree ob, ob a, Ob a) => Free ob a ~> a Source Github #

freeMap :: forall {k} (ob :: OB k) (a :: k) (b :: k). HasFree ob => (a ~> b) -> Free ob a ~> Free ob b Source Github #

freeComp :: forall {k} (ob :: OB k) (c :: k) (b :: k) (a :: k). (HasFree ob, Ob c) => (b ~> Free ob c) -> (a ~> Free ob b) -> a ~> Free ob c Source Github #

data Ap (f :: k -> Type) (a :: k) where Source Github #

Constructors

Pure :: forall {k} (a :: k) (f :: k -> Type). ((Unit :: k) ~> a) -> Ap f a 
Eff :: forall {k} (f :: k -> Type) (a :: k). f a -> Ap f a 
LiftA2 :: forall {k} (a1 :: k) (b :: k) (a :: k) (f :: k -> Type). (Ob a1, Ob b) => ((a1 ** b) ~> a) -> Ap f a1 -> Ap f b -> Ap f a 

Instances

Instances details
(Monoidal k, Functor f) => Applicative (Ap f :: k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

pure :: forall (a :: k). ((Unit :: k) ~> a) -> (Unit :: Type) ~> Ap f a Source Github #

liftA2 :: forall (a :: k) (b :: k) (c :: k). (Ob a, Ob b) => ((a ** b) ~> c) -> (Ap f a ** Ap f b) ~> Ap f c Source Github #

(CategoryOf k, Functor f) => Functor (Ap f :: k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

map :: forall (a :: k) (b :: k). (a ~> b) -> Ap f a ~> Ap f b Source Github #

(Monoidal k, Monoid m) => Monoid (Ap f m :: Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

mempty :: (Unit :: Type) ~> Ap f m Source Github #

mappend :: (Ap f m ** Ap f m) ~> Ap f m Source Github #

Functor (Ap :: (k -> Type) -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

map :: forall (a :: k -> Type) (b :: k -> Type). (a ~> b) -> Ap a ~> Ap b 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 #

retractAp :: forall {k} f (a :: k). Applicative f => Ap f a -> f a Source Github #

data FreePromonad (p :: k -> k -> Type) (a :: k) (b :: k) where Source Github #

Constructors

Unit :: forall {k} (a :: k) (b :: k) (p :: k -> k -> Type). (a ~> b) -> FreePromonad p a b 
Comp :: forall {k} (p :: k -> k -> Type) (a :: k) (b1 :: k) (b :: k). p a b1 -> FreePromonad p b1 b -> FreePromonad p a b 

Instances

Instances details
Profunctor p => Profunctor (FreePromonad p :: j -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

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

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

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

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

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

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

Functor (FreePromonad :: (k -> k -> Type) -> k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

map :: forall (a :: k -> k -> Type) (b :: k -> k -> Type). (a ~> b) -> FreePromonad a ~> FreePromonad b Source Github #

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

Defined in Proarrow.Profunctor.Free

Methods

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

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

freePromonadAlg :: forall {k} (p :: k +-> k) (a :: k) (b :: k). (p :.: FreePromonad p) a b -> FreePromonad p a b Source Github #

retractFreePromonad :: forall {k1} (p :: k1 +-> k1). Promonad p => FreePromonad p :~> p Source Github #

class (forall k. b k => c (f k)) => HasFreeK (b :: Kind -> Constraint) (c :: Kind -> Constraint) (f :: Kind -> Kind) | b c -> f where Source Github #

Associated Types

type Lift (b :: Kind -> Constraint) (c :: Kind -> Constraint) (f :: Kind -> Kind) (a :: k) :: f k Source Github #

type Retract (b :: Kind -> Constraint) (c :: Kind -> Constraint) (f :: Kind -> Kind) (a :: f k) :: k Source Github #

Methods

liftK :: forall k (x :: k) (y :: k). b k => (x ~> y) -> Lift b c f x ~> Lift b c f y Source Github #

retractK :: forall k (x :: f k) (y :: f k). c k => (x ~> y) -> Retract b c f x ~> Retract b c f y Source Github #

Instances

Instances details
HasFreeK TracedMonoidal CompactClosed INT Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Associated Types

type Lift TracedMonoidal CompactClosed INT (a :: k) 
Instance details

Defined in Proarrow.Profunctor.Free

type Lift TracedMonoidal CompactClosed INT (a :: k) = 'I a (Unit :: k)
type Retract TracedMonoidal CompactClosed INT ('I a b :: INT k) 
Instance details

Defined in Proarrow.Profunctor.Free

HasFreeK CategoryOf Monoidal LIST Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

Associated Types

type Lift CategoryOf Monoidal LIST (a :: k) 
Instance details

Defined in Proarrow.Profunctor.Free

type Lift CategoryOf Monoidal LIST (a :: k) = 'L '[a]
type Retract CategoryOf Monoidal LIST (a :: LIST k) 
Instance details

Defined in Proarrow.Profunctor.Free

type Retract CategoryOf Monoidal LIST (a :: LIST k) = Fold (UN ('L :: [k] -> LIST k) a)

Methods

liftK :: forall k (x :: k) (y :: k). CategoryOf k => (x ~> y) -> Lift CategoryOf Monoidal LIST x ~> Lift CategoryOf Monoidal LIST y Source Github #

retractK :: forall k (x :: LIST k) (y :: LIST k). Monoidal k => (x ~> y) -> Retract CategoryOf Monoidal LIST x ~> Retract CategoryOf Monoidal LIST y Source Github #

Orphan instances

HasFree ob => Corepresentable (Rep (Forget ob) :: k -> SUBCAT ob -> Type) Source Github #

By creating the left adjoint to the forgetful functor, we obtain the free-forgetful adjunction.

Instance details

Methods

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

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

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

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