HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

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

Used by in this set · 0

Nothing in this set depends on it.