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?