Implicit parameter for BiFunctor

117 Views Asked by At

I'm planning to use Bifunctor IO with a channel for errors. So I tried to provide an implicit instance for MonadError but it fails to compile.

import cats.MonadError

sealed trait AppErrors
   //...

object App{
    def runApp[F[_, _]: MonadError[F[AppErrors, ?], ?]] = {

    }
}

For instance cats-bio: cats.BIO[+E, +A]

I got the compile error

Error:(13, 22) type F takes type parameters
  def runApp[F[_, _] : MonadError[F[AppErrors, ?], ?]] ={}

I do not really understand how to fix that requiring MonadError[F[_], A].

0

There are 0 best solutions below