A better way would be to simply add deriving (Eq, Ord) to the type definition.
Since you specified your constructors in ascending order, the derived instance of Ord will give you exactly the order you want.
However, if the change of order in the definition is not for any reason, you can still get Eq, since the order does not matter for this. Given an Eq instance, we can manually write an instance for Ord. The shortest way to define a comparison would probably be to describe all the combinations for which the comparison should return LT, and then just use compare xy | x == y = Eq; compare _ _ = GT for the rest of the combinations.
source share