@@ -16,7 +16,6 @@ module Control.Monad.Validation
1616 , vWarningL
1717 , vZoom
1818 , vZoomL
19− , vPromote
2019 , mmSingleton
2120 , setMempty
2221 , neConcat
@@ -144,12 +143,12 @@ neConcat f a
144143textErrors :: [Text] -> Maybe Text
145144textErrors = neConcat (\a b -> a <> ", " <> b)
146145
147−-- | Returns 'mempty' instead of error if no warnings have occurred.
146+-- | Returns 'mempty' instead of error if no warnings have occured.
148147-- Returns 'Nothing' as the second element of tuple if computation was
149148-- interrupted by 'vError'.
150149--
151150-- Returns all concatenated errors and warnings and the result if no
152−-- errors have occurred (warnings could have occurred).
151+-- errors have occured (warnings could have occured).
153152--
154153-- >>> :{
155154-- runValidationT $ do
@@ -175,7 +174,7 @@ runValidationT (ValidationT m) = do
175174 Right a -> (warnings, Just a)
176175
177176-- | Like 'runValidationT' but doesn't return the result
178−-- if any warning has occurred.
177+-- if any warning has occured.
179178--
180179-- >>> :{
181180-- runValidationTEither $ do
@@ -286,12 +285,3 @@ vZoomL
286285 -> ValidationT a m x
287286 -> ValidationT b m x
288287vZoomL l = vZoom (setMempty l)
289−
290−-- | Turn any warnings the have occurred into errors.
291−vPromote
292− :: (Monad m, Monoid a, Eq a)
293− => ValidationT a m x
294− -> ValidationT a m x
295−vPromote m = do
296− err <- lift $ runValidationTEither m
297− either vError return err