Skip to content

Commit

Permalink
fix ambiguous ContravariantShow[SortedSet[A]] (& SortedMap)
Browse files Browse the repository at this point in the history
  • Loading branch information
chwthewke committed Mar 15, 2024
1 parent d323fac commit 868ede1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/main/scala/cats/Show.scala
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ object Show extends ScalaVersionSpecificShowInstances with ShowInstances {
cats.instances.either.catsStdShowForEither[A, B]
implicit def catsShowForSet[A: Show]: Show[Set[A]] = cats.instances.set.catsStdShowForSet[A]
implicit def catsShowForMap[K: Show, V: Show]: Show[Map[K, V]] = cats.instances.map.catsStdShowForMap[K, V]
implicit def catsShowForSortedSet[A: Show]: Show[SortedSet[A]] = cats.instances.sortedSet.catsStdShowForSortedSet[A]
implicit def catsShowForSortedMap[K: Show, V: Show]: Show[SortedMap[K, V]] =
cats.instances.sortedMap.catsStdShowForSortedMap[K, V]

@deprecated("Use catsStdShowForTuple2 in cats.instances.NTupleShowInstances", "2.4.0")
def catsShowForTuple2[A: Show, B: Show]: Show[(A, B)] = cats.instances.tuple.catsStdShowForTuple2[A, B]
Expand All @@ -120,6 +117,10 @@ object Show extends ScalaVersionSpecificShowInstances with ShowInstances {
private[cats] trait ShowInstances extends cats.instances.NTupleShowInstances with ShowInstances0 {
implicit def catsShowForFiniteDuration: Show[FiniteDuration] =
cats.instances.finiteDuration.catsStdShowForFiniteDurationUnambiguous

implicit def catsShowForSortedSet[A: Show]: Show[SortedSet[A]] = cats.instances.sortedSet.catsStdShowForSortedSet[A]
implicit def catsShowForSortedMap[K: Show, V: Show]: Show[SortedMap[K, V]] =
cats.instances.sortedMap.catsStdShowForSortedMap[K, V]
}

private[cats] trait ShowInstances0 {
Expand Down

0 comments on commit 868ede1

Please sign in to comment.