total-maps

Dense and sparse total maps.

Latest on Hackage:1.0.0.3

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed by PaweĊ‚ Nowak
Maintained by pawel834@gmail.com

Total maps are maps that contain a value for every key. This library provides various flavors of total maps.

Dense maps store values for all keys. Sparse maps store a default value and the values which differ from the default. Sparse maps trade the lack of Traversable for a very fast Foldable instance (if the data is really sparse).

Bounded maps require the key type to be enumerable and bounded (have a finite number of values) for most of their functionality. Subset maps do not require the key to be bounded, instead they are parametized by a finite set of valid keys. The key subset is retrieved with help of the excellent reflection library.

The Data.Total.Array modules provide total map implementations based on vectors. It should usually be faster then Maps, unless you need to adjust single elements.

Maps in this library provide most of their functions in typeclasses and so the modules are designed to be imported unqualified.

Changes

1.0.0.2

  • Added the changelog.
  • Added the git repo to cabal file.
  • Fixed complexity of deserialize for TotalSparseMap.

1.0.0.1

  • Fixed build on GHC <7.10.

1.0.0.0

The first version.

comments powered byDisqus