wix/accord — pull request #11 by holograph (2014-03-03 16:46:54+00:00)
Title: Fix for issue #7

Added library provisioning for null safety. This is a breaking API change (though user code that doesn't explicitly decompose `Failure`s should not be affected), as follows:

* The `Validator[-T]` trait is now significantly leaner, essentially reduced to a function `T => Result`;
* `Failure`s now comprise a `Set` of violations (previously a `Seq`);
* A `BaseValidator[T]` abstract class is provided in the _core_ module, along with `ViolationBuilder`. Both significantly simplify the implementation of combinators;
* A `NullSafeValidator[T <: AnyRef]` is also provided. It handles null checks and provides a default failure for nulls;
* Since there's no way to enforce null-awareness at the type-system level, adapting a validator (via the `compose` method) requires the provided function to be null-safe at the contract level.