HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulemonoidal-containers-0.6.8.0Haskell2010

Data.IntMap.Monoidal.Strict

This module provides a Data.IntMap variant which uses the value's Monoid instance to accumulate conflicting entries when merging Maps.

While some functions mirroring those of Data.IntMap are provided here for convenience, more specialized needs will likely want to use either the Newtype or Wrapped instances to manipulate the underlying Map.

  • 1 type
  • 97 values
newtypenewtype MonoidalIntMap a
#

An IntMap with monoidal accumulation

Instances41Functor, Foldable, Traversable, Eq1, Ord1, Show1, …

Often-needed functions

97 declarations
valueelems :: MonoidalIntMap a -> [a]
#

O(n). Return all elements of the map in the ascending order of their keys. Subject to list fusion.

valuekeys :: MonoidalIntMap a -> [Int]
#

O(n). Return all keys of the map in ascending order. Subject to list fusion.