Proposal: add laziness to Data.Map / IntMap

Jamie Brandon jamiiecb at
Tue Aug 5 15:03:23 EDT 2008

> This of course raises the question of why I don't just use that library. I'm
> checking it out, but it's quite a bit bigger than Data.Map. The thing I like
> about Data.Map is that it's relatively simple and I can see whats going on
> very quickly, enough to make modifications (which I'm about to do.) Reading
> Data.Tree.AVL is a more daunting task.

I agree. Have a look at . The
Data.GMap.OrdMap module is a wrapper around AvlTree, using a slightly
more complete interface than Data.Map . It should make an easier
starting point. In fact, I suspect that if you just make a new
AvlTreeL by deleting every occurrence of `seq` and then OrdMapL by
changing the import in OrdMap everything would work seamlessly.

The current version of OrdMap should be fairly safe to use. I'll be
putting a proper package on hackage in a week or two once Ive tidied
everything up.


More information about the Libraries mailing list