Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ValidationT e m a = ValidationT {
- unValidationT :: ExceptT e (StateT e m) a
- newtype MonoidMap k v = MonoidMap (Map k v)
- _MonoidMap :: forall k v k v. Iso (MonoidMap k v) (MonoidMap k v) (Map k v) (Map k v)
- mmAppend :: (Ord k, Semigroup v) => MonoidMap k v -> MonoidMap k v -> MonoidMap k v
- mmSingleton :: (Eq v, Monoid v, Ord k) => k -> v -> MonoidMap k v
- setMempty :: Monoid s => ASetter' s a -> a -> s
- memptyWrap :: (Eq a, Monoid a) => b -> (a -> b) -> a -> b
- neConcat :: (Foldable f, Eq (f a), Monoid a, Monoid (f a)) => (a -> a -> a) -> f a -> Maybe a
- textErrors :: [Text] -> Maybe Text
- runValidationT :: (Monoid e, Monad m) => ValidationT e m a -> m (e, Maybe a)
- runValidationTEither :: (Monoid e, Eq e, Monad m) => ValidationT e m a -> m (Either e a)
- handleValidationT :: (Monoid e, Monad m, Eq e) => (e -> m a) -> ValidationT e m a -> m a
- vError :: Monad m => e -> ValidationT e m a
- vWarning :: (Monad m, Monoid e) => e -> ValidationT e m ()
- vErrorL :: (Monad m, Monoid e) => ASetter' e a -> a -> ValidationT e m x
- vWarningL :: (Monad m, Monoid e) => ASetter' e a -> a -> ValidationT e m ()
- vZoom :: (Monad m, Monoid a, Monoid b) => (a -> b) -> ValidationT a m x -> ValidationT b m x
- vZoomL :: (Monad m, Monoid a, Monoid b) => ASetter' b a -> ValidationT a m x -> ValidationT b m x
Documentation
newtype ValidationT e m a Source #
Collects all throwed "warnings" throwed through StateT and "errors" throwed through ExceptT to single value using Monoid FIXME: give more instances like HReaderT and MonadBaseControl/MonadMask
ValidationT | |
|
Instances
newtype MonoidMap k v Source #
Instances
memptyWrap :: (Eq a, Monoid a) => b -> (a -> b) -> a -> b Source #
neConcat :: (Foldable f, Eq (f a), Monoid a, Monoid (f a)) => (a -> a -> a) -> f a -> Maybe a Source #
runValidationT :: (Monoid e, Monad m) => ValidationT e m a -> m (e, Maybe a) Source #
runValidationTEither :: (Monoid e, Eq e, Monad m) => ValidationT e m a -> m (Either e a) Source #
handleValidationT :: (Monoid e, Monad m, Eq e) => (e -> m a) -> ValidationT e m a -> m a Source #
vError :: Monad m => e -> ValidationT e m a Source #
Stops further execution of validation
vWarning :: (Monad m, Monoid e) => e -> ValidationT e m () Source #
Does not stop further execution, append warning to
vZoom :: (Monad m, Monoid a, Monoid b) => (a -> b) -> ValidationT a m x -> ValidationT b m x Source #
vZoomL :: (Monad m, Monoid a, Monoid b) => ASetter' b a -> ValidationT a m x -> ValidationT b m x Source #