Hi,
I ran into a confusing situation while using covariant parameters with scalaz.\/.
scalaz.\/ is defined with covariant type parameters like so \/[+A, +B], and it works
as expected when I use it in the following manner:
trait Foo[+A, +B] {
def getFoo(): A \/ B
}
However when I declare it's usage within another monad I get a type error.
trait Foo[ F[ _ ], +A, +B] {
def getFoo(): F[A \/ B]
}
The above code throws a compile-time error regarding type parameters A and B being
covariant types at invariant positions, but I thought scalaz.\/ is defined with covariant types.
Am I missing something? Did I forget some other meticulous step in defining the F monad?
Any help/guidance is greatly appreciated. Thank you!