Safe Haskell | None |
---|---|
Language | Haskell2010 |
- 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)
- 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 | |
|
MonadBase b m => MonadBase b (ValidationT e m) Source # | |
MonadTrans (ValidationT e) Source # | |
LiftLocal (ValidationT e) Source # | |
Monad m => Monad (ValidationT e m) Source # | |
Functor m => Functor (ValidationT e m) Source # | |
Monad m => Applicative (ValidationT e m) Source # | |
MonadThrow m => MonadThrow (ValidationT e m) Source # | |
MonadCatch m => MonadCatch (ValidationT e m) Source # | |
newtype MonoidMap k v Source #
(Eq v, Eq k) => Eq (MonoidMap k v) Source # | |
(Ord v, Ord k) => Ord (MonoidMap k v) Source # | |
(Show v, Show k) => Show (MonoidMap k v) Source # | |
(Ord k, Monoid v) => Monoid (MonoidMap k v) Source # | |
(Arbitrary v, Arbitrary k, Ord k) => Arbitrary (MonoidMap k v) Source # | |
(ToJSON k, ToJSON v) => ToJSON (MonoidMap k v) Source # | |
(Ord k, FromJSON k, FromJSON v) => FromJSON (MonoidMap k v) Source # | |
Ord k => Ixed (MonoidMap k v) Source # | |
Ord k => At (MonoidMap k v) Source # | |
type Index (MonoidMap k v) Source # | |
type IxValue (MonoidMap k v) Source # | |
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 #