Created
September 20, 2012 09:24
-
-
Save pedrofurla/3754885 to your computer and use it in GitHub Desktop.
Validation#flatmap is crazy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val a = fromEither(listing).toValidationNEL | |
val retr = { x:VideoListing => fromEither(lister.retrieveReport(x)).toValidationNEL } | |
val res0 = for ( | |
l <- a; | |
rep <- retr(l) | |
) yield { rep } | |
main.scala:75: Unable to unapply type `scalaz.package.ValidationNEL[Exception,com.listify.upload.VideoListing]` into a type constructor of kind `M[_]` that is classified by the type class `scalaz.Bind` | |
[error] 1) Check that the type class is defined by compiling `implicitly[scalaz.Bind[<type constructor>]]`. | |
[error] 2) Review the implicits in object Unapply, which only cover common type 'shapes' | |
[error] (implicit not found: scalaz.Unapply[scalaz.Bind, scalaz.package.ValidationNEL[Exception,com.listify.upload.VideoListing]]) | |
[error] l <- a; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment