On Thu, 2 Sep 2010 19:30:17 +0200, Daniel Fischer
<daniel.is.fisc...@web.de> wrote:
> Why would one consider using Ord for Map an abuse?
> A kludge, for performance reasons, but an abuse?

Because it forces one to declare Ord instances for types which have no
natural ordering. It is useful to *not* have such instances, in order to
catch programming errors.

A separate type class for types which can be ordered in some (possibly
arbitrary) way, for use in Data.Map, would remedy this.


Regards,

Arie

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to