enummapset-th

TH-generated EnumSet/EnumMap wrappers around IntSet/IntMap. https://github.com/tsurucapital/enummapset-th

Version on this page:0.6.1.1
LTS Haskell 9.21:0.6.1.1
Stackage Nightly 2017-07-25:0.6.1.1
Latest on Hackage:[email protected]:1

See all snapshots enummapset-th appears in

BSD-3-Clause licensed by Liyang HU
Maintained by [email protected]

Module documentation for 0.6.1.1

This version can be pinned in stack with:[email protected]:3f90c1fa6b195fc5917e1a6c94dec0c2a46ef6f0aa5823283f0186bb03bb53b6,1711

This package wraps IntSet and IntMap from containers, and provides fast sets and maps keyed on any data type with a well-behaved Enum instance. Useful for derived Enums, newtype'd Ints, or any data type that can be packed into an Int: just implement fromEnum and toEnum.

The boilerplate is generated using Template Haskell, so unlike enummapset it's easier to maintain and keep up-to-date with containers. On the downside, it's less portable.

Note that Data.EnumMap.Lazy and Data.EnumMap.Strict provide distinct newtype wrappers, and their respective Functor instances behave as expected, unlike that of IntMap which is alway lazy.

Used by 1 package in lts-7.24(full list with versions):