Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- newtype Validation errors monad state newState = Validation {
- runValidation :: state -> monad (newState, errors)
- validation :: Monad m => Lens b s -> a -> Validator ek ev m a b -> Validation [(ek, ev)] m s s
- validation_ :: Monad m => a -> Validator ek ev m a b -> Validation [(ek, ev)] m s s
- composeValidation :: (Monad m, Monoid e) => Validation e m s t -> Validation e m t u -> Validation e m s u
- composeValidation' :: Monad m => (e -> f -> g) -> Validation e m s t -> Validation f m t u -> Validation g m s u
Documentation
newtype Validation errors monad state newState Source
Validation | |
|
(Monad m, Monoid e) => Category * (Validation e m) |
validation :: Monad m => Lens b s -> a -> Validator ek ev m a b -> Validation [(ek, ev)] m s s Source
validation_ :: Monad m => a -> Validator ek ev m a b -> Validation [(ek, ev)] m s s Source
Same as "validation", but throws away validator result. This is useful for the side effects from a monadic validator.
composeValidation :: (Monad m, Monoid e) => Validation e m s t -> Validation e m t u -> Validation e m s u Source
composeValidation' :: Monad m => (e -> f -> g) -> Validation e m s t -> Validation f m t u -> Validation g m s u Source