Bulat Ziganshin wrote:
Hello Adrian,

Monday, March 10, 2008, 2:00:18 PM, you wrote:

instance Ord Foo where
    compare (Foo a _) (Foo b _) = compare a b

I would consider such an Ord instance to be hopelessly broken, and I

hmmmm. for example, imagine files in file manager sorted by size or date

In such cases you should be using sortBy, not the overloaded sort
(you have several reasonable orderings for the same record type say).

Regards
--
Adrian Hey





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

Reply via email to