On Wed, Aug 12, 2009 at 2:09 AM, Ketil Malde<ke...@malde.org> wrote: > Felipe Lessa <felipe.le...@gmail.com> writes: > >>> There are some funky Enum instances around: > >> IMO it's implicit that keys overwrite eachother whenever their >> 'fromEnum' is equal, however that may be spoken in the docs. > > I couldn't find anything explicit in the documentation. I'd suggest a > clear note at the top, dismissing the (IMO natural) notion that > "EnumMap k v" behaves like "Map k v" (which was true for IntMap and > Map Int, I believe).
I haven't updated any of the documentation from IntMap over s/IntMap/EnumMap/g. > > And perhaps also note that you will get exceptions for values outside > the Enum range. > I'd think that part is obvious. > It strikes me that using Bits instead of Enum might be more likely to > be what people want in many cases - but perhaps that would be too slow? > Also that Enum really should map to Integer, but again, that's a speed > issue.¹ > I think Enum is a little more natural--perhaps I'm wrong. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe