BSD-3-Clause licensed by Ben Gamari
Maintained by [email protected]
This version can be pinned in stack with:monoidal-containers-0.4.0.0@sha256:7e52944ef27fce8e59b5bac5d59b35e88b36a5f65176aa7b784f848e9e9b9a22,2099

Module documentation for 0.4.0.0

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)

Changes

Monoidal containers

0.4.0.0

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

Pre-history