|
Control.Functor.Algebra | Portability | non-portable (rank-2 polymorphism) | Stability | experimental | Maintainer | Edward Kmett <ekmett@gmail.com> |
|
|
|
Description |
Algebras, Coalgebras, Bialgebras, and Dialgebras and their (co)monadic
variants
|
|
Synopsis |
|
|
|
Documentation |
|
type Dialgebra f g a = f a -> g a | Source |
|
F,G-dialgebras generalize algebras and coalgebras
NB: these definitions are actually wrong.
|
|
type GDialgebra f g w m a = f (w a) -> g (m a) | Source |
|
|
|
F-G-bialgebras are representable by DiAlg (f :+: Identity) (Identity :+: g) a
and so add no expressive power, but are a lot more convenient.
|
|
|
|
type Algebra f a = f a -> a | Source |
|
F-Algebras
|
|
type GAlgebra f w a = f (w a) -> a | Source |
|
F-W-Comonadic Algebras for a given comonad W
|
|
type Coalgebra f a = a -> f a | Source |
|
F-Coalgebras
|
|
type GCoalgebra f m a = a -> f (m a) | Source |
|
F-M-Monadic Coalgebras for a given monad M
|
|
|
Martin Erwig's trialgebras for indexed data types
|
|
|
Turn an F-algebra into a F-W-algebra by throwing away the comonad
|
|
|
Turn a F-coalgebra into a F-M-coalgebra by returning into a monad
|
|
|
|
|
|
|
|
|
|
Produced by Haddock version 2.4.2 |