free-functors-0.8.3: 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 # 

Methods

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

ProfunctorMonad (HHFree c) Source # 

Methods

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

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

BifunctorMonad * * (HHFree c) Source # 

Methods

bireturn :: p a b -> t p a b #

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

bijoin :: t (t p) a b -> t p a b #

BifunctorFunctor * * * * (HHFree c) Source # 

Methods

bifmap :: (HHFree c :-> k1) p q -> (k2 :-> k3) (t p) (t q) #

SuperClass1 (* -> * -> *) (Category *) c => Category * (HHFree c f) Source # 

Methods

id :: cat a a #

(.) :: cat b c -> cat a b -> cat a c #

SuperClass1 (* -> * -> *) Bifunctor c => Bifunctor (HHFree c f) Source # 

Methods

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

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

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

SuperClass1 (* -> * -> *) Arrow c => Arrow (HHFree c f) Source # 

Methods

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

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

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

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

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

SuperClass1 (* -> * -> *) ArrowZero c => ArrowZero (HHFree c f) Source # 

Methods

zeroArrow :: HHFree c f b c #

SuperClass1 (* -> * -> *) ArrowPlus c => ArrowPlus (HHFree c f) Source # 

Methods

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

SuperClass1 (* -> * -> *) ArrowChoice c => ArrowChoice (HHFree c f) Source # 

Methods

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

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

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

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

SuperClass1 (* -> * -> *) ArrowApply c => ArrowApply (HHFree c f) Source # 

Methods

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

SuperClass1 (* -> * -> *) ArrowLoop c => ArrowLoop (HHFree c f) Source # 

Methods

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

SuperClass1 (* -> * -> *) Biapplicative c => Biapplicative (HHFree c f) Source # 

Methods

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

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

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

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

SuperClass1 (* -> * -> *) Choice c => Choice (HHFree c f) Source # 

Methods

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

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

SuperClass1 (* -> * -> *) Closed c => Closed (HHFree c f) Source # 

Methods

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

SuperClass1 (* -> * -> *) Strong c => Strong (HHFree c f) Source # 

Methods

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

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

SuperClass1 (* -> * -> *) Profunctor c => Profunctor (HHFree c f) Source # 

Methods

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

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

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

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

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

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 #