-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
The following code fails to compile with a 'Erroneous or inaccessible type' error which I believe is not correct.
object CompileError {
import scalaz._
import Scalaz._
object IsItABug {
implicit val monadWriter = EitherT.listenableMonadWriter[Writer, String, String]
def apply(opt: Option[String]) = {
def lift[T](o: Option[T], name: String) = o match {
case None ⇒ monadWriter.left[T]("The " + name + " is missing.\n")
case Some(m) ⇒ monadWriter.right[T](m) :++>> (_ ⇒ "The " + name + " is present.\n")
}
def oops() =
for {
s ← lift(opt, "Blah") // erroneous or inaccessible type error here
if true
} yield "x"
}
}
}