scalaz/scalaz — pull request #457 by S11001001 (2013-08-01 03:11:14+00:00)
Title: Foldable, Foldable1, & Traverse1 laws

I made up some laws for these typeclasses, though the `Traverse1` laws are pretty much blindly copied from the `Traverse` ones, down to some of them not being hooked up.

I especially hope the approach to `Foldable1` laws amuses. Note that the constraints on testing `Traverse1` laws did not have to change to accommodate the `Foldable1` laws.

Moreover, the `Foldable1` laws seem to be genuine laws, whereas the `Foldable` ones are just checking consistency with default derived functions. (As this kind of "law" turned out to be very useful for `Functor`, `Applicative`, and `Monad`, I did it anyway.)

I am sure other things that I did not mention can be tested with the foldable laws.