comparable constraint for generic equality