Portability | non-portable (rank-2 polymorphism) |
---|---|

Stability | experimental |

Maintainer | Edward Kmett <ekmett@gmail.com> |

Generalized hylomorphisms

- hylo :: Functor f => Algebra g b -> (f :~> g) -> Coalgebra f a -> a -> b
- g_hylo :: (Comonad w, Functor f, Monad m) => Dist g w -> Dist m f -> GAlgebra g w b -> (f :~> g) -> GCoalgebra f m a -> a -> b
- bihylo :: QFunctor f Hask Hask => Algebra (g d) b -> (f c :~> g d) -> Coalgebra (f c) a -> a -> b
- g_bihylo :: (Comonad w, QFunctor f Hask Hask, Monad m) => Dist (g d) w -> Dist m (f c) -> GAlgebra (g d) w b -> (f c :~> g d) -> GCoalgebra (f c) m a -> a -> b
- hhylo :: HFunctor f => HAlgebra f b -> HCoalgebra f a -> a :~> b

# Documentation

hylo :: Functor f => Algebra g b -> (f :~> g) -> Coalgebra f a -> a -> bSource

hylo :: (g b -> b) -> (forall c. f c -> g c) -> (a -> f b) -> a -> b

g_hylo :: (Comonad w, Functor f, Monad m) => Dist g w -> Dist m f -> GAlgebra g w b -> (f :~> g) -> GCoalgebra f m a -> a -> bSource

g_hylo :: (Comonad w, Functor f, Monad m) => (forall d. g (w d) -> w (g d)) -> (forall e. m (f e) -> f (m e)) -> (g (w b) -> b) -> (forall c. f c -> g c) -> a -> f (m a) -> a -> b

bihylo :: QFunctor f Hask Hask => Algebra (g d) b -> (f c :~> g d) -> Coalgebra (f c) a -> a -> bSource