Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | sjoerd@w3future.com |
A monoid as a category with one object.
- data MonoidA m a b where
- data Mon where
- MonoidMorphism :: (Monoid m1, Monoid m2) => (m1 -> m2) -> Mon m1 m2
- data ForgetMonoid = ForgetMonoid
- data FreeMonoid = FreeMonoid
- freeMonoidAdj :: Adjunction Mon (->) FreeMonoid ForgetMonoid
- foldMap :: Monoid m => (a -> m) -> [a] -> m
- listMonadReturn :: a -> [a]
- listMonadJoin :: [[a]] -> [a]
- listComonadExtract :: Monoid m => [m] -> m
- listComonadDuplicate :: Monoid m => [m] -> [[m]]
Documentation
MonoidMorphism :: (Monoid m1, Monoid m2) => (m1 -> m2) -> Mon m1 m2 |
data ForgetMonoid Source
Functor ForgetMonoid | The |
freeMonoidAdj :: Adjunction Mon (->) FreeMonoid ForgetMonoidSource
The free monoid functor is left adjoint to the forgetful functor.
listMonadReturn :: a -> [a]Source
listMonadJoin :: [[a]] -> [a]Source
listComonadExtract :: Monoid m => [m] -> mSource
listComonadDuplicate :: Monoid m => [m] -> [[m]]Source