You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[error] found : List[test.Foo]
[error] required: cats.Show.Shown
[error] show"$listFoo"
The Shown derivation gives better error to understand what happened:
valshown= cats.Show.Shown.mat(listFoo)
[error] both method catsShowForList in object Show of type [A](implicit evidence$3: cats.Show[A]): cats.Show[List[A]]
[error] and method catsShowForSeq in object Show of type [A](implicit evidence$4: cats.Show[A]): cats.Show[Seq[A]]
[error] match expected type cats.Show.ContravariantShow[List[test.Foo]]
[error] val shown: Show.Shown = cats.Show.Shown.mat(listFoo)
I suppose that this is because we need ContravatiantShow[-T] and you can easily fix the problem with importing the List instances. But it would be nice to either fix it somehow - maybe prioritise the Seq instances lower - or just drop a note in the release notes that you need to add import cats.instances.list._.
The text was updated successfully, but these errors were encountered:
I've just checked that the code above compiles if I will change import cats.syntax.all._ to import cats.implicits._. It finds catsStdShowForList.
So maybe it wasn't caught because people are not migrated yet?
After instances for
Seq
was introduced in 2.3.0 code suchstarted to fail with, a rather unfriendly, error:
The
Shown
derivation gives better error to understand what happened:I suppose that this is because we need
ContravatiantShow[-T]
and you can easily fix the problem with importing theList
instances. But it would be nice to either fix it somehow - maybe prioritise theSeq
instances lower - or just drop a note in the release notes that you need to addimport cats.instances.list._
.The text was updated successfully, but these errors were encountered: