category-extras-0.44.4: Various modules and constructs inspired by category theory

Portabilitynon-portable (rank-2 polymorphism)
MaintainerEdward Kmett <>



Generalized hylomorphisms



hylo :: Functor f => Alg g b -> Natural f g -> CoAlg f a -> a -> bSource

g_hylo :: (Comonad w, Functor f, Monad m) => Dist g w -> Dist m f -> AlgW g w b -> Natural f g -> CoAlgM f m a -> a -> bSource

bihylo :: (Bifunctor f, Bifunctor g) => Alg (g d) b -> Natural (f c) (g d) -> CoAlg (f c) a -> a -> bSource

g_bihylo :: (Comonad w, Bifunctor f, Monad m) => Dist (g d) w -> Dist m (f c) -> AlgW (g d) w b -> Natural (f c) (g d) -> CoAlgM (f c) m a -> a -> bSource

hhylo :: HFunctor f => AlgH f b -> CoAlgH f a -> Natural a bSource

higher order hylomorphisms for use in building up and tearing down higher order functors