vinyl-0.4.3: Extensible Records

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Vinyl.Idiom.Validation

Synopsis

Documentation

data Result e a Source

A type which is similar to Either, except that it has a slightly different Applicative instance.

Constructors

Failure e 
Success a 

Instances

Functor (Result e) 
Monoid e => Applicative (Result e)

The Applicative instance to Result relies on its error type being a Monoid. That way, it can accumulate errors.

(Eq e, Eq a) => Eq (Result e a) 
(Show e, Show a) => Show (Result e a) 

type Validator e = Lift (->) Identity (Result e) Source

Validators transform identities into results.