validations-0.1.0.2: A nice way to define field validations in Haskell.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Validations.Validator

Documentation

attach :: Monad m => Checker ev a b -> ek -> Validator ek ev m a b Source

attachM :: Monad m => MonadicChecker ev m a b -> ek -> Validator ek ev m a b Source

newtype Validator errorKey errorValue monad a b Source

Constructors

Validator 

Fields

runValidator :: a -> monad (Either (errorKey, errorValue) b)
 

Instances

Monad m => Category * (Validator ek ev m) 

composeValidator :: Monad m => Validator ek ev m a b -> Validator ek ev m b c -> Validator ek ev m a c Source