data-category-0.4.1: Category theory

Portabilitynon-portable
Stabilityexperimental
Maintainersjoerd@w3future.com

Data.Category.Monoid

Description

A monoid as a category with one object.

Synopsis

Documentation

data MonoidA m a b whereSource

The arrows are the values of the monoid.

Constructors

MonoidA :: Monoid m => m -> MonoidA m m m 

Instances

Monoid m => Category (MonoidA m)

A (prelude) monoid as a category with one object.

data Mon whereSource

Constructors

MonoidMorphism :: (Monoid m1, Monoid m2) => (m1 -> m2) -> Mon m1 m2 

Instances

Category Mon

The category of all monoids, with monoid morphisms as arrows.

data ForgetMonoid Source

Constructors

ForgetMonoid 

Instances

Functor ForgetMonoid

The ForgetMonoid functor forgets the monoid structure.

data FreeMonoid Source

Constructors

FreeMonoid 

Instances

Functor FreeMonoid

The FreeMonoid functor is the list functor.

freeMonoidAdj :: Adjunction Mon (->) FreeMonoid ForgetMonoidSource

The free monoid functor is left adjoint to the forgetful functor.

foldMap :: Monoid m => (a -> m) -> [a] -> mSource

listMonadJoin :: [[a]] -> [a]Source

listComonadDuplicate :: Monoid m => [m] -> [[m]]Source