Several data-types like Either but with differing properties and type-class instances.
Library support is provided for those different representations, include
lens
-related functions for converting between each and abstracting over their
similarities.
Download from hackage.
-
Validation
The
Validation
data type is isomorphic toEither
, but has an instance ofApplicative
that accumulates on the error side. That is to say, if two (or more) errors are encountered, they are appended using aSemigroup
operation.As a consequence of this
Applicative
instance, there is no correspondingBind
orMonad
instance.Validation
is an example of, "An applicative functor that is not a monad."