jaspervdj / digestive-functors

A general way to consume input using applicative functors
149 stars 71 forks source link

Applicative validation #105

Open nikita-volkov opened 9 years ago

nikita-volkov commented 9 years ago

Having a type, which wraps a -> Result e b and has an Applicative instance, should allow to circumvent the awkward conditions combinator and generally enhance the validation facility. I.e.:

newtype Parser a b =
  Parser (a -> Result e b)