scalascala-catstagless-final

Problem with Cats FlatMap in my Tagless Final class


I have the following class:

class MyBot[F[_] : FlatMap]

In this class I have a function:

private def handleCallback(): F[Boolean]

In my understanding this should work:

handleCallback().flatMap(..)

But it throws: cannot resolve symbol flatMap

What do I miss?


Solution

  • The solution of Mon Calamari did not fix my problem, but when checking FlatMap on the suggested Blog I spotted:

    import cats.implicits._ which I missed - and fixed my problem - everything stayed the same.