The definition of Ord looks something like this (but not quite)
class Ord a where compare :: a -> a -> Ordering
and Ordering has three possible values: LT, EQ, GT .
So, you need to determine what the result of each comparison should be. Something like:
instance Ord Suit where compare Clubs Diamonds = LT compare Diamonds Clubs = GT compare Diamonds Diamonds = EQ compare Diamonds _ = LT
Your actual order may be different, but this should give you the basic idea.
tredontho
source share