proarrow-0: Category theory with a central role for profunctors
Safe HaskellNone
LanguageHaskell2010

Proarrow.Profunctor.Free

Documentation

class (CategoryOf k, Representable (Free ob), forall (b :: k). Ob b => ob (Free ob % b)) => HasFree (ob :: k -> Constraint) where Source Comments #

Associated Types

type Free (ob :: k -> Constraint) :: k +-> k Source Comments #

Methods

lift' :: forall (a :: k) (b :: k). (a ~> b) -> Free ob a b Source Comments #

retract' :: forall (b :: k) (a :: k). ob b => Free ob a b -> a ~> b Source Comments #

Instances

Instances details
HasFree Monoid Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Associated Types

type Free Monoid 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

lift' :: (a ~> b) -> Free Monoid a b Source Comments #

retract' :: Monoid b => Free Monoid a b -> a ~> b Source Comments #

HasFree Semigroup Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Associated Types

type Free Semigroup 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

lift' :: (a ~> b) -> Free Semigroup a b Source Comments #

retract' :: Semigroup b => Free Semigroup a b -> a ~> b Source Comments #

(Representable (FreeMonoid ((~>) :: CAT k)), forall (b :: k). Ob b => FreeMonoidIsMonoid b, Cartesian k) => HasFree (Monoid :: k -> Constraint) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Associated Types

type Free (Monoid :: k -> Constraint) 
Instance details

Defined in Proarrow.Profunctor.Free

type Free (Monoid :: k -> Constraint) = FreeMonoid ((~>) :: CAT k)

Methods

lift' :: forall (a :: k) (b :: k). (a ~> b) -> Free (Monoid :: k -> Constraint) a b Source Comments #

retract' :: forall (b :: k) (a :: k). Monoid b => Free (Monoid :: k -> Constraint) a b -> a ~> b Source Comments #

HasFree (Promonad :: PRO k k -> Constraint) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Associated Types

type Free (Promonad :: PRO k k -> Constraint) 
Instance details

Defined in Proarrow.Profunctor.Free

type Free (Promonad :: PRO k k -> Constraint) = Star (FreePromonad :: (k -> k -> Type) -> k -> k -> Type)

Methods

lift' :: forall (a :: PRO k k) (b :: PRO k k). (a ~> b) -> Free (Promonad :: PRO k k -> Constraint) a b Source Comments #

retract' :: forall (b :: PRO k k) (a :: PRO k k). Promonad b => Free (Promonad :: PRO k k -> Constraint) a b -> a ~> b Source Comments #

HasFree (Profunctor :: PRO j k -> Constraint) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Coyoneda

Associated Types

type Free (Profunctor :: PRO j k -> Constraint) 
Instance details

Defined in Proarrow.Profunctor.Coyoneda

type Free (Profunctor :: PRO j k -> Constraint) = Star (Coyoneda :: (j -> k -> Type) -> j -> k -> Type)

Methods

lift' :: forall (a :: PRO j k) (b :: PRO j k). (a ~> b) -> Free (Profunctor :: PRO j k -> Constraint) a b Source Comments #

retract' :: forall (b :: PRO j k) (a :: PRO j k). Profunctor b => Free (Profunctor :: PRO j k -> Constraint) a b -> a ~> b Source Comments #

HasProducts k => HasFree (Applicative :: (k -> Type) -> Constraint) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Associated Types

type Free (Applicative :: (k -> Type) -> Constraint) 
Instance details

Defined in Proarrow.Profunctor.Free

type Free (Applicative :: (k -> Type) -> Constraint) = Star (Ap :: (k -> Type) -> k -> Type)

Methods

lift' :: forall (a :: k -> Type) (b :: k -> Type). (a ~> b) -> Free (Applicative :: (k -> Type) -> Constraint) a b Source Comments #

retract' :: forall (b :: k -> Type) (a :: k -> Type). Applicative b => Free (Applicative :: (k -> Type) -> Constraint) a b -> a ~> b Source Comments #

HasFree (On Monoid Semigroup) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Associated Types

type Free (On Monoid Semigroup) 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

lift' :: forall (a :: SUBCAT Semigroup) (b :: SUBCAT Semigroup). (a ~> b) -> Free (On Monoid Semigroup) a b Source Comments #

retract' :: forall (b :: SUBCAT Semigroup) (a :: SUBCAT Semigroup). On Monoid Semigroup b => Free (On Monoid Semigroup) a b -> a ~> b Source Comments #

lift :: forall {j} (ob :: j -> Constraint) (a :: j). (HasFree ob, Ob a) => a ~> (Free ob % a) Source Comments #

retract :: forall {k} (ob :: k -> Constraint) (a :: k). (HasFree ob, ob a, Ob a) => (Free ob % a) ~> a Source Comments #

data FreeSub (ob :: OB k) (a :: SUBCAT ob) (b :: k) where Source Comments #

Constructors

FreeSub :: forall {k} (ob :: OB k) (a1 :: k) (b :: k). ob a1 => Free ob a1 b -> FreeSub ob ('SUB a1 :: SUBCAT ob) b 

Instances

Instances details
HasFree ob => Representable (FreeSub ob :: SUBCAT ob -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

index :: forall (a :: SUBCAT ob) (b :: j). FreeSub ob a b -> a ~> (FreeSub ob % b) Source Comments #

tabulate :: forall (b :: j) (a :: SUBCAT ob). Ob b => (a ~> (FreeSub ob % b)) -> FreeSub ob a b Source Comments #

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (FreeSub ob % a) ~> (FreeSub ob % b) Source Comments #

HasFree ob => Adjunction (FreeSub ob :: SUBCAT ob -> k -> Type) (Forget ob :: k -> SUBCAT ob -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

unit :: forall (a :: k). Ob a => (Forget ob :.: FreeSub ob) a a Source Comments #

counit :: (FreeSub ob :.: Forget ob) :~> ((~>) :: CAT (SUBCAT ob)) Source Comments #

HasFree ob => Profunctor (FreeSub ob :: SUBCAT ob -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

dimap :: forall (c :: SUBCAT ob) (a :: SUBCAT ob) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> FreeSub ob a b -> FreeSub ob c d Source Comments #

(\\) :: forall (a :: SUBCAT ob) (b :: k) r. ((Ob a, Ob b) => r) -> FreeSub ob a b -> r Source Comments #

type (FreeSub ob :: SUBCAT ob -> j -> Type) % (a :: j) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

type (FreeSub ob :: SUBCAT ob -> j -> Type) % (a :: j) = 'SUB (Free ob % a) :: SUBCAT ob

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

Constructors

Pure :: forall {k} (a :: k) (f :: k -> Type). El 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
(HasProducts k, Functor f) => Applicative (Ap f :: k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

pure :: forall (a :: k). El a -> El (Ap f a) Source Comments #

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 Comments #

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

Defined in Proarrow.Profunctor.Free

Methods

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

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

Defined in Proarrow.Profunctor.Free

Methods

map :: forall (a :: k -> Type) (b :: k -> Type). (a ~> b) -> Ap a ~> Ap b Source Comments #

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

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

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) (b1 :: k) (b :: k) (a :: k). p b1 b -> FreePromonad p a b1 -> FreePromonad p a b 

Instances

Instances details
Profunctor p => Profunctor (FreePromonad p :: k -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

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

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

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

Defined in Proarrow.Profunctor.Free

Methods

id :: forall (a :: k). Ob a => FreePromonad p a a Source Comments #

(.) :: forall (b :: k) (c :: k) (a :: k). FreePromonad p b c -> FreePromonad p a b -> FreePromonad p a c Source Comments #

Functor (FreePromonad :: (k -> k -> Type) -> k -> k -> Type) Source Comments # 
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 Comments #

class Ob (Lift c f a) => ObLift (c :: Kind -> Constraint) (f :: Kind -> Kind) k (a :: k) Source Comments #

Instances

Instances details
Ob (Lift c f a) => ObLift c f k (a :: k) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

class Ob (Retract c f a) => ObRetract (c :: Kind -> Constraint) (f :: Kind -> Kind) k (a :: f k) Source Comments #

Instances

Instances details
Ob (Retract c f a) => ObRetract c f k (a :: f k) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

class (forall (a :: k). ObLift c f k a, forall (a :: f k). ObRetract c f k a) => ObLiftRetract (c :: Kind -> Constraint) (f :: Kind -> Kind) k Source Comments #

Instances

Instances details
(forall (a :: k). ObLift c f k a, forall (a :: f k). ObRetract c f k a) => ObLiftRetract c f k Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

class (forall k. CategoryOf k => c (f k), forall k. ObLiftRetract c f k) => HasFreeK (c :: Kind -> Constraint) (f :: Kind -> Kind) | c -> f where Source Comments #

Associated Types

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

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

Methods

liftK :: forall k (a :: k) (b :: k). CategoryOf k => (a ~> b) -> Lift c f a ~> Lift c f b Source Comments #

retractK :: forall k (a :: f k) (b :: f k). c k => (a ~> b) -> Retract c f a ~> Retract c f b Source Comments #

data FreeMonoid (p :: k +-> k) (a :: k) (b :: k) where Source Comments #

Constructors

Nil :: forall {k} (a :: k) (b :: k) (p :: k +-> k). (Ob a, Ob b) => FreeMonoid p a b 
Cons :: forall {k} (p :: k +-> k) (a :: k) (b :: k). p a b -> FreeMonoid p a b -> FreeMonoid p a b 

Instances

Instances details
Profunctor p => Profunctor (FreeMonoid p :: k -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

dimap :: forall (c :: k) (a :: k) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> FreeMonoid p a b -> FreeMonoid p c d Source Comments #

(\\) :: forall (a :: k) (b :: k) r. ((Ob a, Ob b) => r) -> FreeMonoid p a b -> r Source Comments #

Profunctor p => Monoid ('PR (FreeMonoid p) :: PROD (k -> k -> Type)) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

data family FreeMonoidF (b :: k) :: k Source Comments #

Instances

Instances details
(Cartesian k, Representable (FreeMonoid ((~>) :: CAT k)), Ob b, (FreeMonoid ((~>) :: CAT k) % b) ~ FreeMonoidF b, Ob (FreeMonoid ((~>) :: CAT k) % b)) => Monoid (FreeMonoidF b :: k) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

class Monoid (FreeMonoid ((~>) :: CAT k) % b) => FreeMonoidIsMonoid (b :: k) Source Comments #

Instances

Instances details
Monoid (FreeMonoid ((~>) :: CAT k) % b) => FreeMonoidIsMonoid (b :: k) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free