Add validity checks for IntSet and IntMap (#456)
authorMatt Renaud <matt@m-renaud.com>
Sat, 30 Dec 2017 17:08:11 +0000 (09:08 -0800)
committerGitHub <noreply@github.com>
Sat, 30 Dec 2017 17:08:11 +0000 (09:08 -0800)
commitc3bca8f3d03a3af175604f3584cd01ba35305ead
tree532c5d066b9743aaf6818c41c55b6e81c38ffa02
parente631b6bc086197bd8206260e96b1b7fe4da3247f
Add validity checks for IntSet and IntMap (#456)

These checks codify the invariants laid out in the IntSet and IntMap comments. We
add validity checks for constructed IntSets and IntMaps as well as union,
intersection, and difference operations on them.

* Add validity tests for functions producing IntSets/IntMaps.
* Add field comments for IntMap Bin constructor.
* Move validity checks into tests/.
Data/IntMap/Internal.hs
Data/IntSet/Internal.hs
containers.cabal
tests/IntMapValidity.hs [new file with mode: 0644]
tests/IntSetValidity.hs [new file with mode: 0644]
tests/intmap-properties.hs
tests/intset-properties.hs