Data.IntMap/IntSet inconsistencies

Evan Laforge qdunkan at
Mon Nov 2 13:14:27 EST 2009

Also +1.

On a related note, I think it's unfortunate that those functions are
partial.  Like List.minimum and maximum, I always wind up wrapping
them in a function that provides a default value.

I suppose that would be a different proposal though... but maybe if
we're breaking compatibility anyway it would be a good time to, say,
change them to 'IntMap k a -> (k, a) -> (k, a)'?  Actually, it seems
that often 'IntMap k a -> b -> ((k, a) -> b) -> b' is more convenient,
e.g. 'findMax fm Nothing Just', and you can always get the default val
version back with 'id'.

More information about the Libraries mailing list