Package1.1.3Data
validation
A data-type like Either but with an accumulating Applicative
- Version1.1.3
- CategoryData
- LicenceBSD-3-Clause
- AuthorTony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> <dibblego>, Nick Partridge <nkpart>
- MaintainerTony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> <dibblego>, Nick Partridge <nkpart>, Queensland Functional Programming Lab <oᴉ˙ldɟb@llǝʞsɐɥ>
- Homepagegithub.com/qfpl/validation
- Pinned byhackage validation 1.1.3
- Sourcehackage.haskell.org/package/validation-1.1.3
Modules
1 module- Data.Validation17A data type similar to Data.Either that accumulates failures.
Description
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.
Validation
The Validation 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. Validation is an example of, "An applicative functor that is not a monad."
Depends on
7 packages- assoc-1.1.1in this set
- base-4.20.2.0with GHC
- bifunctors-5.6.2in this set
- deepseq-1.5.0.0with GHC
- lens-5.3.5in this set
- semigroupoids-6.0.1in this set
- semigroups-0.20in this set
Used by in this set · 0
Nothing in this set depends on it.