License | BSD-style (see the file LICENSE) |
---|---|
Maintainer | sjoerd@w3future.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- 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
ProfunctorFunctor (HHCofree c) Source # | |
ProfunctorComonad (HHCofree c) Source # | |
Defined in Data.Functor.HHCofree proextract :: forall (p :: Type -> Type -> Type). Profunctor p => HHCofree c p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => HHCofree c p :-> HHCofree c (HHCofree c p) # | |
BifunctorComonad (HHCofree c :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | |
Defined in Data.Functor.HHCofree | |
BifunctorFunctor (HHCofree c :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | |
(forall (x :: Type -> Type -> Type). c x => Bifunctor x) => Bifunctor (HHCofree c g) Source # | |
(forall (x :: Type -> Type -> Type). c x => Choice x) => Choice (HHCofree c f) Source # | |
(forall (x :: Type -> Type -> Type). c x => Closed x) => Closed (HHCofree c f) Source # | |
Defined in Data.Functor.HHCofree | |
(forall (x :: Type -> Type -> Type). c x => Strong x) => Strong (HHCofree c f) Source # | |
(forall (x :: Type -> Type -> Type). c x => Profunctor x) => Profunctor (HHCofree c g) Source # | |
Defined in Data.Functor.HHCofree dimap :: (a -> b) -> (c0 -> d) -> HHCofree c g b c0 -> HHCofree c g a d # lmap :: (a -> b) -> HHCofree c g b c0 -> HHCofree c g a c0 # rmap :: (b -> c0) -> HHCofree c g a b -> HHCofree c g a c0 # (#.) :: forall a b c0 q. Coercible c0 b => q b c0 -> HHCofree c g a b -> HHCofree c g a c0 # (.#) :: forall a b c0 q. Coercible b a => HHCofree c g b c0 -> q a b -> HHCofree c g a c0 # |