vinyl-0.2: Extensible Records

Safe HaskellSafe-Inferred

Data.Vinyl.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 = Identity ~> Result eSource

Validators transform identities into results.