| License | BSD-style (see the file LICENSE) |
|---|---|
| Maintainer | sjoerd@w3future.com |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Functor.HHCofree
Description
A cofree functor is right adjoint to a forgetful functor. In this package the forgetful functor forgets class constraints.
Compared to Data.Functor.HCofree we have 2 two parameters.
Synopsis
- type (:~~>) f g = forall c d. f c d -> g c d
- data HHCofree c g a b where
- deriveHHCofreeInstance :: Name -> Q [Dec]
- counit :: HHCofree c g :~~> g
- leftAdjunct :: c f => (f :~~> g) -> f :~~> HHCofree c g
- unit :: c g => g :~~> HHCofree c g
- rightAdjunct :: (f :~~> HHCofree c g) -> f :~~> g
- transform :: (forall r. c r => (r :~~> f) -> r :~~> g) -> HHCofree c f :~~> HHCofree c g
- hfmap :: (f :~~> g) -> HHCofree c f :~~> HHCofree c g
- hextend :: (HHCofree c f :~~> g) -> HHCofree c f :~~> HHCofree c g
Documentation
data HHCofree c g a b where Source #
The higher order cofree functor for constraint c.
Instances
| ProfunctorComonad (HHCofree c) Source # | |
Defined in Data.Functor.HHCofree | |
| BifunctorComonad (HHCofree c :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | |
Defined in Data.Functor.HHCofree | |
| ProfunctorFunctor (HHCofree c :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | |
| BifunctorFunctor (HHCofree c :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | |
| (c ~=> Bifunctor, c (HHCofree c a)) => Bifunctor (HHCofree c a) Source # | |
| (c ~=> Choice, c (HHCofree c a)) => Choice (HHCofree c a) Source # | |
| (c ~=> Closed, c (HHCofree c a)) => Closed (HHCofree c a) Source # | |
Defined in Data.Functor.HHCofree | |
| (c ~=> Strong, c (HHCofree c a)) => Strong (HHCofree c a) Source # | |
| (c ~=> Profunctor, c (HHCofree c a)) => Profunctor (HHCofree c a) Source # | |
Defined in Data.Functor.HHCofree Methods dimap :: (a0 -> b) -> (c0 -> d) -> HHCofree c a b c0 -> HHCofree c a a0 d lmap :: (a0 -> b) -> HHCofree c a b c0 -> HHCofree c a a0 c0 rmap :: (b -> c0) -> HHCofree c a a0 b -> HHCofree c a a0 c0 (#.) :: forall a0 b c0 q. Coercible c0 b => q b c0 -> HHCofree c a a0 b -> HHCofree c a a0 c0 (.#) :: forall a0 b c0 q. Coercible b a0 => HHCofree c a b c0 -> q a0 b -> HHCofree c a a0 c0 | |