Implicit Monad not found with Cats Free foldMap

263 views Asked by At

I have an interpreter with the natural transformation MyADT ~> MyState.

I have no problem when type MyState[A] = State[MyClass, A]. However, if I have type MyState[A] = State[MyClass, M[A]], where M is any monad, then I get the error: could not find implicit value parameter M: cats.Monad[MyState] when calling foldMap.

What is the problem?

0

There are 0 answers