Do you know why Validated is covariant on its two type (like Either) but EitherT is invariant?
sealed abstract class Validated[+E, +A]
final case class EitherT[F[_], A, B]
Wouldn鈥檛 it require F[+_]? Which limits us. Note Functor has widen and Bifunctor has leftWiden which you can use like explicit covariance.
@johnynek you're probably right, make sense. I guess it is just annoying that we have to treat Either and EitherT differently in a for comprehension. It doesn't help that intellij doesn't recognize leftWiden (but that's another issue).
Has anyone got any clue why IntelliJ doesn't recognise leftWiden?
Most helpful comment
Wouldn鈥檛 it require
F[+_]? Which limits us. Note Functor has widen and Bifunctor has leftWiden which you can use like explicit covariance.