
Here's an improved version of the patch. It adds 11 more QuickCheck properties. Now everything is tested except: * The Data instance for IntSet (does anyone know how to test that?) * The debugging functions showTree and showTreeWith * The various read functions (read, readList, reads, readsPrec) are not that well tested, especially parse failures. I found that IntSet.showTree and IntSet.showTreeWith are not identical to Set.showTree and Set.showTreeWith. Not a big deal since they're just debugging functions, I guess. But it means I can't include QuickCheck properties for them. I commented out some code that could never be executed: * Some case-statement cases that could never occur. * >>= for the Identity monad used internally. union had an odd comment about "right bias". I understand how right bias and left bias can be different in a generic container like Set (since the Eq instance for the contained type might not be structural equality). But for IntSet, there's no way to distinguish different copies of the number 7. In any case, the documentation at http://www.haskell.org/ghc/docs/latest/html/libraries/containers-0.1.0.0/Dat... doesn't mention anything about bias. So I took out insertR, the function that implemented "right bias". If this patch is accepted, I intend to work on QuickCheck properties for Data.Set next.