Proposal: Significant performance improvements for Data.Map

Ian Lynagh igloo at earth.li
Fri Sep 3 11:52:08 EDT 2010


On Fri, Sep 03, 2010 at 08:23:39AM -0700, Donald Bruce Stewart wrote:
> igloo:
> > On Sun, Aug 29, 2010 at 06:15:45AM -0700, Donald Bruce Stewart wrote:
> > > 
> > > +    --         , testProperty "insert then delete"   prop_insertDelete
> > > +    --         , testProperty "insert then delete2"  prop_insertDelete2
> > 
> > Why are some tests, such as those above, commented out?
> 
> I sometimes didn't come up with an equivalent property from lists.

I don't understand what you mean; these properties already seem to be
written?:

prop_insertDelete :: Int -> UMap -> Bool
prop_insertDelete k t = valid $ delete k (insert k () t)

prop_insertDelete2 :: Int -> UMap -> Property
prop_insertDelete2 k t = (lookup k t == Nothing) ==> (delete k (insert k () t) == t)


Thanks
Ian



More information about the Libraries mailing list