
10 Mar
2008
10 Mar
'08
10:53 a.m.
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