The hash constraint is expanded to an implicit evidence parameter with type Hash[K], which is never used. Every method defined in the body of this implicit conversion definition has a parameter fa of type HashMap[K, A], from which the constraint K:Hash can be obtained. Furthermore for binary compatibility reasons any additions methods defined must start from existing ones so any future method will also have the same property. The implicit unused evidence parameter seems like it will never see any use, so it might be best to remove it (from what I understand this mean to mark the current one deprecated and have it point to the new one without the constraint).
|
sealed abstract private[collections] class HashMapInstances extends HashMapInstances1 { |
|
implicit def catsCollectionsUnorderedTraverseForHashMap[K: Hash]: UnorderedTraverse[HashMap[K, *]] = |
|
new UnorderedTraverse[HashMap[K, *]] { |
The hash constraint is expanded to an implicit evidence parameter with type Hash[K], which is never used. Every method defined in the body of this implicit conversion definition has a parameter fa of type HashMap[K, A], from which the constraint K:Hash can be obtained. Furthermore for binary compatibility reasons any additions methods defined must start from existing ones so any future method will also have the same property. The implicit unused evidence parameter seems like it will never see any use, so it might be best to remove it (from what I understand this mean to mark the current one deprecated and have it point to the new one without the constraint).
cats-collections/core/src/main/scala/cats/collections/HashMap.scala
Lines 1429 to 1431 in 943883f