@hackage validation0.6.2
A data-type like Either but with an accumulating Applicative
Categories
License
BSD-3-Clause
Maintainer
Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> <dibblego>, Nick Partridge <nkpart>, Queensland Functional Programming Lab <oᴉ˙ldɟb@llǝʞsɐɥ>
Links
Versions
Installation
Tested Compilers
Dependencies (7)
- base >=3 && <5
- bifunctors >=5.1 && <6
- lens >=4 && <5
- mtl >=2.0 && <2.3
- semigroupoids >=5 && <6
- semigroups >=0.8 && <1 Show all…
Dependents (28)
@hackage/sv, @hackage/railroad, @hackage/sv-core, @cardano/ouroboros-consensus-cardano, @hackage/imprevu, @hackage/strongweak, Show all…
Package Flags
small_base
(on by default)
Choose the new, split-up base package.
A data-type like Either but with differing properties and type-class instances.
Library support is provided for this different representation, include
lens-related functions for converting between each and abstracting over their
similarities.
AccValidation
The AccValidation data type is isomorphic to Either, but has an instance
of Applicative that accumulates on the error side. That is to say, if two
(or more) errors are encountered, they are appended using a Semigroup
operation.
As a consequence of this Applicative instance, there is no corresponding
Bind or Monad instance. AccValidation is an example of, "An applicative
functor that is not a monad."