Data.IntMap API

Iavor Diatchki iavor.diatchki at
Mon Nov 28 17:32:19 EST 2005

Data.IntMap (distributed with GHC 6.4.1) contains the following instance:
Ord a => Monoid (IntMap a)
The instance is defined with mempty = empty, and mappend = union,
neither of which requires the Ord instances on the values in the map,
so the 'Ord a' constraint appears unneccessary.
PS: Isn't picking union for the monoid class a little arbitrary?

More information about the Libraries mailing list