License | BSD-style (see the file LICENSE) |
---|---|
Maintainer | sjoerd@w3future.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
A free functor is left adjoint to a forgetful functor. In this package the forgetful functor forgets class constraints.
Compared to Data.Functor.Free
we're going up a level.
These free functors go between categories of functors and the natural
transformations between them.
Synopsis
- type (:~>) f g = forall b. f b -> g b
- newtype HFree c f a = HFree {}
- deriveHFreeInstance :: Name -> Q [Dec]
- unit :: f :~> HFree c f
- rightAdjunct :: c g => (f :~> g) -> HFree c f :~> g
- counit :: c f => HFree c f :~> f
- leftAdjunct :: (HFree c f :~> g) -> f :~> g
- transform :: (forall r. c r => (g :~> r) -> f :~> r) -> HFree c f :~> HFree c g
- hfmap :: (f :~> g) -> HFree c f :~> HFree c g
- bind :: (f :~> HFree c g) -> HFree c f :~> HFree c g
- liftFree :: f a -> HFree c f a
- lowerFree :: c f => HFree c f a -> f a
- convert :: (c (t f), Monad f, MonadTrans t) => HFree c f a -> t f a
- iter :: c Identity => (forall b. f b -> b) -> HFree c f a -> a
- wrap :: f (HFree Monad f a) -> HFree Monad f a
Documentation
The higher order free functor for constraint c
.
Instances
c ~=> Monad => Monad (HFree c a) Source # | The free monad of a functor. |
c ~=> Functor => Functor (HFree c a) Source # | |
c ~=> Applicative => Applicative (HFree c a) Source # | |
c ~=> Contravariant => Contravariant (HFree c a) Source # | |
c ~=> Alternative => Alternative (HFree c a) Source # | |
c ~=> Divisible => Divisible (HFree c a) Source # | |
c ~=> Decidable => Decidable (HFree c a) Source # | |