instance Ord (HsOverLit id) where
compare (HsIntegral i1 _ _) (HsIntegral i2 _ _) = i1 `compare` i2
compare (HsIntegral _ _ _) (HsFractional _ _ _) = LT
compare (HsIntegral _ _ _) (HsIsString _ _ _) = LT
compare (HsFractional f1 _ _) (HsFractional f2 _ _) = f1 `compare` f2
instance Ord (HsOverLit id) where
compare (HsIntegral i1 _ _) (HsIntegral i2 _ _) = i1 `compare` i2
compare (HsIntegral _ _ _) (HsFractional _ _ _) = LT
compare (HsIntegral _ _ _) (HsIsString _ _ _) = LT
compare (HsFractional f1 _ _) (HsFractional f2 _ _) = f1 `compare` f2