St.Antario
St.Antario

Reputation: 27455

Implicit parameter for BiFunctor

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].

Upvotes: 0

Views: 112

Answers (0)

Related Questions