
1 Jun
2007
1 Jun
'07
12:27 a.m.
Brandon,
If I'm reading the reports correctly, the Ord instance was actually added in the Haskell 1.1 standard, by changing the definition of Bool from
data Bool = True | False
to
data Bool = True | False deriving (Eq, Ord, Ix, Enum, Text, Binary)
It's data Bool = False | True
It seems like we actually get that order because deriving Ord makes constructors earlier in the definition compare greater than later constructors, and nobody was bothered by that ordering.
It's the other way around: data T = Less | More deriving (Eq, Ord) gives you *Main> Less < More True Cheers, Stefan