validation: A data-type like Either but with an accumulating Applicative
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
AccValidation data type is isomorphic to
Either, but has an instance
Applicative that accumulates on the error side. That is to say, if two
(or more) errors are encountered, they are appended using a
As a consequence of this
Applicative instance, there is no corresponding
AccValidation is an example of, "An applicative
functor that is not a monad."
Validation data type is isomorphic to
Either and has a
instance that does the same as
Either. The only difference to
the constructor names and surrounding library support.
ValidationT data type is the monad transformer for
MonadTrans is provided for `(ValidationT err)`. Due to the
arrangement of the
ValidationT type constructor, which permits a `MonadTrans
instance, there is no possible
Bifunctor instance. Consequently, the
ValidationB data type provides a
Bifunctor instance (but not a
MonadTrans instance). Library support is provided to exploit the isomorphism
Note that since
AccValidation is not a monad, there is also no corresponding
monad transformer for this data type.
ValidationB data type is similar to the monad transformer for
ValidationT), however, due to the arrangement of the
ValidationB type constructor, which permits a
Bifunctor instance, there is
MonadTrans instance. Consequently, the
ValidationT data type
MonadTrans instance (but not a
Bifunctor instance). Library
support is provided to exploit the isomorphism to
Validation err a` type-alias is equivalent to
`ValidationT err Identity a` and so is isomorphic to
Either and others.
Libraries are supplied accordingly.
|Versions||0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 1|
|Dependencies||base (>=3 && <5), bifunctors (>=3.0), lens (>=4.0 && <5), mtl (>=2.0 && <2.3), semigroupoids (>=4.0), semigroups (>=0.8), transformers (>=0.3 && <0.5) [details]|
|Copyright||Copyright (C) 2014,2015 NICTA Limited|
|Author||Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> <dibblego>, Nick Partridge <nkpart>|
|Maintainer||Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> <dibblego>, Nick Partridge <nkpart>|
|Source repo||head: git clone email@example.com:NICTA/validation.git|
|Uploaded||by TonyMorris at Fri Dec 4 01:47:38 UTC 2015|
|Distributions||LTSHaskell:1, NixOS:1, Stackage:1|
|Downloads||8049 total (236 in the last 30 days)|
|Rating||2.25 (votes: 2) [estimated by rule of succession]|
|Status||Docs available [build log]
Last success reported on 2015-12-04 [all 1 reports]
Hackage Matrix CI
Choose the new, split-up base package.
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
For package maintainers and hackage trustees