Browse files

rename validation instance

  • Loading branch information...
1 parent 7dd9bd6 commit ae0f678d0342e04c9eecde020976d6a8047103e7 @retronym retronym committed Jul 21, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 core/src/main/scala/scalaz/Validation.scala
View
8 core/src/main/scala/scalaz/Validation.scala
@@ -247,7 +247,7 @@ trait FailProjectionInstances extends FailProjectionInstances0 {
new IsomorphismTraverse[F, G] with IsomorphismApplicative[F, G] {
def iso = FailProjectionEIso2[E]
- implicit def G = Validation.validationApplicative(E)
+ implicit def G = Validation.validationTraverseApplicativePlus(E)
}
}
@@ -282,7 +282,7 @@ trait FailProjectionInstances extends FailProjectionInstances0 {
IsomorphismTraverse[({type λ[α] = FailProjection[E, α]})#λ, ({type λ[α] = Validation[E, α]})#λ] with
IsomorphismPlus[({type λ[α] = FailProjection[E, α]})#λ, ({type λ[α] = Validation[E, α]})#λ] {
def iso = FailProjectionEIso2
- implicit def G = Validation.validationApplicative
+ implicit def G = Validation.validationTraverseApplicativePlus
}
implicit def failProjectionBitraverse =
@@ -340,7 +340,7 @@ trait ValidationInstances0 {
trait ValidationInstances extends ValidationInstances0 {
/**Validation is an Applicative Functor, if the error type forms a Semigroup */
- implicit def validationApplicative[E](implicit E: Semigroup[E]) = new Traverse[({type λ[α] = Validation[E, α]})#λ]
+ implicit def validationTraverseApplicativePlus[E](implicit E: Semigroup[E]) = new Traverse[({type λ[α] = Validation[E, α]})#λ]
with Applicative[({type λ[α] = Validation[E, α]})#λ] with Plus[({type λ[α] = Validation[E, α]})#λ] {
def point[A](a: => A): Validation[E, A] = Success(a)
@@ -353,7 +353,7 @@ trait ValidationInstances extends ValidationInstances0 {
def plus[A](a: Validation[E, A], b: => Validation[E, A]): Validation[E, A] = a orElse b
}
- def validationNelApplicative[E] = validationApplicative[NonEmptyList[E]]
+ def validationNelApplicative[E] = validationTraverseApplicativePlus[NonEmptyList[E]]
implicit def validationBitraverse = new Bitraverse[Validation] {
override def bimap[A, B, C, D](fab: Validation[A, B])(f: A => C, g: B => D): Validation[C, D] = fab.bimap(f, g)

0 comments on commit ae0f678

Please sign in to comment.