我尝试过:
def convert[E, A](in: List[ValidatedNel[E, A]]): Ior[NonEmptyList[E], List[A]] =
in.separate
我得到:
could not find implicit value for parameter G: cats.Bifoldable[cats.data.ValidatedNel]
[error] in.separate
然后我尝试了这样的事情:
def convert[E, A](in: List[ValidatedNel[E, A]]): Ior[NonEmptyList[E], List[A]] =
in.traverse(_.toIor)
现在我得到了:
could not find implicit value for evidence parameter of type cats.Applicative[G]
[error] in.traverse(_.toIor)
答案 0 :(得分:0)
如@Toxaris所述,-Ypartial-unification
需要启用