git.iko.soy/monoidal-containers
on master help sign in
12 lines 734 B history raw
1# monoidal-containers
3Often when working with the containers offered by the `containers` and
4`unordered-containers` packages one would prefer the monoidal structure
5of the values to be used when resolving conflicts between keys when merging
6structures. Sadly, these are not the semantics offered by the provided
7instances. This package provides `newtypes` with an appropriate set of
8instances and utility functions to make them usable.
10## Important Note
12This library is designed to be a drop-in replacement for `Data.Map` and similar. Absolutely no other semantic changes are introduced in functions like `fromList` or `insert`. They are still left-biased like `Data.Map`'s. The only difference is in instances for `Semigroup`.