We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keys in a Map are always distinct. Therefore sorting by the keys should be sufficient:
Map
implicit def cogenMap[K: Cogen: Ordering, V: Cogen]: Cogen[Map[K, V]] = Cogen.it(_.toVector.sortBy(_._1).iterator)
The text was updated successfully, but these errors were encountered:
Dropped Ordering bound on the values in cogenMap
29baf02
It's safe to sort only by the keys, because they are distinct. Fixes typelevel#356
102654b
No branches or pull requests
Keys in a
Map
are always distinct. Therefore sorting by the keys should be sufficient:The text was updated successfully, but these errors were encountered: