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!

-- 
You received this message because you are subscribed to the Google Groups 
"scalaz" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/scalaz.
For more options, visit https://groups.google.com/d/optout.

Reply via email to