BSD-3-Clause licensed by Ben Gamari
Maintained by [email protected]
This version can be pinned in stack with:monoidal-containers-,2166

Module documentation for

Containers with merging via monoidal accumulation. The Monoid instances provided by the containers and unordered-containers packages merge structures in a left-biased manner instead of using the underlying monoidal structure of the value.

This package wraps the types provided by these packages, but provides Monoid instances implemented in terms of the value type's mappend. For instance, the Monoid Map instance looks like,

instance (Ord k, Semigroup a) => Monoid (MonoidalMap k a)


Monoidal containers

General changes:

  • Added support for unordered-containers < 0.2.8
  • Added many more functions in Data.Map.[Strict.]Monoid

Weakened Monoid constraints to Semigroup whenever possible as enabled by the Semigroup-Monoid proposal. This includes,

  • the Monoid instance of MonoidalHashMap and MonoidalMap
  • the IsList instance of MonoidalHashMap and MonoidalMap
  • the modifyDef and mapKeys functions of MonoidalHashMap

0.3 and earlier