Traverseinstance. But it usually doesn't matter.
StateTin this case). Anyway a small example would help
F = StateT[IO
def localState[A](initial: S)(runState: MonadState[IO, S] => IO[A]): IO[A] = Ref[IO].of(initial).flatMap(_.runState(runState))
runStateis from meow
def write[F[_]](a: String)(implicit F: Thing[F])
so I have the following:
implicit def derived[ f: F ~> G, fk: FunctorK[A]): A[G] = fk.mapK(af)(f) TopicsAlgebra[IO]]], F[ ], G[ ]](implicit af: A[F],
(I also have a bunch of
impliclty calls to verify that the required implicits are in scope)
the error I'm getting is:
[error] diverging implicit expansion for type TopicsAlgebra[cats.effect.IO] [error] starting with method derived [error] L87: TopicsAlgebra[IO]
so as you can see, I can't add type ascriptions to the method call-site, because it's an implicit method
derivedexplicitly with explicit type arguments and get the result you expect? It's possible those type parameters can't be inferred.