scala - Scalaz nested Validation: could not find implicit value -
playing scalaz validationnel, have following nested validations trying flatten:
import scala.xml.{nodeseq, node, elem} import scalaz._ import scalaz._  val duration: validationnel[string, int] = // ... val nodes: validationnel[string, nodeseq] = // ...  val r: validationnel[string, list[mytype]] =           (duration |@| nodes) { (d, ns) =>            val n: validationnel[string, list[mytype]] =                    ns.tolist.traverse[({ type l[x] = validationnel[string, x] })#l, mytype](extractmytype(_, d))            n          }.flatmap(identity) // ...  private def extractmytype(n: node, d: int): validationnel[string, mytype] = //...   when compiling sbt, get:
[error] myclass.scala:xx: not find implicit value parameter f0: scalaz.bind[scalaz.unapply[scalaz.apply,scalaz.validationnel[string,int]]{type m[x] = scalaz.validationnel[string,x]; type = int}#m] [error]         val r = (duration |@| nodes) { (d, ns) =>                                              ^   i using scala 2.10.0 , scalaz 7.1.1
what doing wrong?
 
 
  
Comments
Post a Comment