validation: A data-type like Either but with an accumulating Applicative

[ bsd3, data, library ] [ Propose Tags ]

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.

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."

Versions [faq] 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, 1.1
Change log changelog
Dependencies base (>=4.5 && <5), bifunctors (>=5.1 && <6), deepseq (>=1.2 && <1.5), ghc-prim (==, lens (==4.*), semigroupoids (==5.*), semigroups (>=0.8 && <1) [details]
License BSD-3-Clause
Copyright Copyright (C) 2010-2013 Tony Morris, Nick Partridge Copyright (C) 2014,2015 NICTA Limited Copyright (c) 2016-2019, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230.
Author Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> <dibblego>, Nick Partridge <nkpart>
Maintainer Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> <dibblego>, Nick Partridge <nkpart>, Queensland Functional Programming Lab <oᴉ˙ldɟb@llǝʞsɐɥ>
Revised Revision 1 made by GeorgeWilson at 2019-05-17T01:24:21Z
Category Data
Home page
Bug tracker
Source repo head: git clone
Uploaded by qfpl at 2019-05-01T06:30:55Z
Distributions LTSHaskell:1, NixOS:1.1, Stackage:1.1
Downloads 17281 total (154 in the last 30 days)
Rating 2.5 (votes: 3) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-05-01 [all 1 reports]


[Index] [Quick Jump]


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees