scalaz/scalaz — pull request #101 by folone (2012-07-09 10:01:31+00:00)
Title: Validation's Semigroup instance

I've noticed, that `Validation`'s `Semigroup` instance requires that only the left (`Failure`) element is a `Semigroup`. At the same time, `Validation` itself has an `append` method, which requires both elements to be `Semigroups`. I've changed the default instance to use that method. The old definition is still used to generate the `FailProjection`'s `Semigroup` instance and is renamed to `validationSemigroupFail`. Here's how this works now:

```scala
scala> val success1 = 1.success[String]
success1: scalaz.Validation[String,Int] = Success(1)

scala> val success2 = 2.success[String]
success2: scalaz.Validation[String,Int] = Success(2)

scala> val success3 = 1.success[String].fail
success3: scalaz.FailProjection[String,Int] = scalaz.Validation$$anon$18@59bdcda

scala> val success4 = 2.success[String].fail
success4: scalaz.FailProjection[String,Int] = scalaz.Validation$$anon$18@655554a8

scala> success1 |+| success2
res0: scalaz.Validation[String,Int] = Success(3) // was: Success(1)

scala> success3 |+| success4
res1: scalaz.FailProjection[String,Int] = scalaz.Validation$$anon$18@5f6bfe9c

scala> .shows
res2: String = Success(1)
```

Does this make sense?