data-category-0.3.1.1: Restricted categories

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 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.

unMonoidMorphism :: (Monoid m1, Monoid m2) => Mon m1 m2 -> m1 -> m2Source

data FreeMonoid Source

Constructors

FreeMonoid 

Instances

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

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

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