No need to edit the library. In the source file:
instance Eq Color where
x == y = fromEnum x == fromEnum y
instance Ord Color where
compare x y = compare (fromEnum x) (fromEnum y)
: fromEnum - Enum, int (Black -> 0, Red -> 1 ..). , , .
: @rampion, , :
instance Eq Color where
(==) = (==) `on` fromEnum
instance Ord Color where
compare = compare `on` fromEnum