free-functors-1.0.1: Free functors, adjoint to functors that forget class constraints.

LicenseBSD-style (see the file LICENSE)
Maintainersjoerd@w3future.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Data.Functor.HHFree

Description

A free functor is left adjoint to a forgetful functor. In this package the forgetful functor forgets class constraints.

Compared to Data.Functor.HFree we have 2 two parameters.

Synopsis

Documentation

type (:~~>) f g = forall a b. f a b -> g a b Source #

Natural transformations.

newtype HHFree c f a b Source #

The higher order free functor over two type parameters for constraint c.

Constructors

HHFree 

Fields

Instances
ProfunctorFunctor (HHFree c) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

promap :: Profunctor p => (p :-> q) -> HHFree c p :-> HHFree c q #

ProfunctorMonad (HHFree c) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

proreturn :: Profunctor p => p :-> HHFree c p #

projoin :: Profunctor p => HHFree c (HHFree c p) :-> HHFree c p #

BifunctorMonad (HHFree c :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

bireturn :: p :-> HHFree c p #

bibind :: (p :-> HHFree c q) -> HHFree c p :-> HHFree c q #

bijoin :: HHFree c (HHFree c p) :-> HHFree c p #

BifunctorFunctor (HHFree c :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

bifmap :: (p :-> q) -> HHFree c p :-> HHFree c q #

(forall (x :: Type -> Type -> Type). c x => Category x) => Category (HHFree c f :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

id :: HHFree c f a a #

(.) :: HHFree c f b c0 -> HHFree c f a b -> HHFree c f a c0 #

(forall (x :: Type -> Type -> Type). c x => Bifunctor x) => Bifunctor (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

bimap :: (a -> b) -> (c0 -> d) -> HHFree c f a c0 -> HHFree c f b d #

first :: (a -> b) -> HHFree c f a c0 -> HHFree c f b c0 #

second :: (b -> c0) -> HHFree c f a b -> HHFree c f a c0 #

(forall (x :: Type -> Type -> Type). c x => Arrow x) => Arrow (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

arr :: (b -> c0) -> HHFree c f b c0 #

first :: HHFree c f b c0 -> HHFree c f (b, d) (c0, d) #

second :: HHFree c f b c0 -> HHFree c f (d, b) (d, c0) #

(***) :: HHFree c f b c0 -> HHFree c f b' c' -> HHFree c f (b, b') (c0, c') #

(&&&) :: HHFree c f b c0 -> HHFree c f b c' -> HHFree c f b (c0, c') #

(forall (x :: Type -> Type -> Type). c x => ArrowZero x) => ArrowZero (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

zeroArrow :: HHFree c f b c0 #

(forall (x :: Type -> Type -> Type). c x => ArrowPlus x) => ArrowPlus (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

(<+>) :: HHFree c f b c0 -> HHFree c f b c0 -> HHFree c f b c0 #

(forall (x :: Type -> Type -> Type). c x => ArrowChoice x) => ArrowChoice (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

left :: HHFree c f b c0 -> HHFree c f (Either b d) (Either c0 d) #

right :: HHFree c f b c0 -> HHFree c f (Either d b) (Either d c0) #

(+++) :: HHFree c f b c0 -> HHFree c f b' c' -> HHFree c f (Either b b') (Either c0 c') #

(|||) :: HHFree c f b d -> HHFree c f c0 d -> HHFree c f (Either b c0) d #

(forall (x :: Type -> Type -> Type). c x => ArrowApply x) => ArrowApply (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

app :: HHFree c f (HHFree c f b c0, b) c0 #

(forall (x :: Type -> Type -> Type). c x => ArrowLoop x) => ArrowLoop (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

loop :: HHFree c f (b, d) (c0, d) -> HHFree c f b c0 #

(forall (x :: Type -> Type -> Type). c x => Biapplicative x) => Biapplicative (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

bipure :: a -> b -> HHFree c f a b #

(<<*>>) :: HHFree c f (a -> b) (c0 -> d) -> HHFree c f a c0 -> HHFree c f b d #

biliftA2 :: (a -> b -> c0) -> (d -> e -> f0) -> HHFree c f a d -> HHFree c f b e -> HHFree c f c0 f0 #

(*>>) :: HHFree c f a b -> HHFree c f c0 d -> HHFree c f c0 d #

(<<*) :: HHFree c f a b -> HHFree c f c0 d -> HHFree c f a b #

(forall (x :: Type -> Type -> Type). c x => Choice x) => Choice (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

left' :: HHFree c f a b -> HHFree c f (Either a c0) (Either b c0) #

right' :: HHFree c f a b -> HHFree c f (Either c0 a) (Either c0 b) #

(forall (x :: Type -> Type -> Type). c x => Closed x) => Closed (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

closed :: HHFree c f a b -> HHFree c f (x -> a) (x -> b) #

(forall (x :: Type -> Type -> Type). c x => Strong x) => Strong (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

first' :: HHFree c f a b -> HHFree c f (a, c0) (b, c0) #

second' :: HHFree c f a b -> HHFree c f (c0, a) (c0, b) #

(forall (x :: Type -> Type -> Type). c x => Profunctor x) => Profunctor (HHFree c f) Source # 
Instance details

Defined in Data.Functor.HHFree

Methods

dimap :: (a -> b) -> (c0 -> d) -> HHFree c f b c0 -> HHFree c f a d #

lmap :: (a -> b) -> HHFree c f b c0 -> HHFree c f a c0 #

rmap :: (b -> c0) -> HHFree c f a b -> HHFree c f a c0 #

(#.) :: Coercible c0 b => q b c0 -> HHFree c f a b -> HHFree c f a c0 #

(.#) :: Coercible b a => HHFree c f b c0 -> q a b -> HHFree c f a c0 #

rightAdjunct :: c g => (f :~~> g) -> HHFree c f :~~> g Source #

counit :: c f => HHFree c f :~~> f Source #

counit = rightAdjunct id

leftAdjunct :: (HHFree c f :~~> g) -> f :~~> g Source #

leftAdjunct f = f . unit

transform :: (forall r. c r => (g :~~> r) -> f :~~> r) -> HHFree c f :~~> HHFree c g Source #

hfmap :: (f :~~> g) -> HHFree c f :~~> HHFree c g Source #

bind :: (f :~~> HHFree c g) -> HHFree c f :~~> HHFree c g Source #