Hoogle Search
Within LTS Haskell 24.25 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
validationFailure :: e -> Validation e aopt-env-conf OptEnvConf.Validation No documentation available.
validationTFailure :: forall (m :: Type -> Type) e a . Applicative m => e -> ValidationT e m aopt-env-conf OptEnvConf.Validation No documentation available.
validationToEither :: Validation e a -> Either (NonEmpty e) aopt-env-conf OptEnvConf.Validation No documentation available.
validationConst :: p -> p -> Validation e a -> pvalida Valida Case analysis for Validation, with replacer. This is similar to validation, but takes in replacers instead of functions. In case of Failure, return the first argument; otherwise, return the second argument.
validationConst e a = validation (const e) (const a)
Examples
>>> validation (const Nothing) Just (Success 'c' :: Validation String Char) Just 'c' >>> validation (const Nothing) Just (Failure "error" :: Validation String Char) Nothing
validationConst :: p -> p -> Validation e a -> pvalida-base Valida Case analysis for Validation, with replacer. This is similar to validation, but takes in replacers instead of functions. In case of Failure, return the first argument; otherwise, return the second argument.
validationConst e a = validation (const e) (const a)
Examples
>>> validation (const Nothing) Just (Success 'c' :: Validation String Char) Just 'c' >>> validation (const Nothing) Just (Failure "error" :: Validation String Char) Nothing
validationNel :: Either e a -> Validation (NonEmpty e) avalidation Data.Validation validationNel is liftError specialised to NonEmpty lists, since they are a common semigroup to use.
validationed :: Validate v => (v e a -> v e' a') -> Validation e a -> Validation e' a'validation Data.Validation Run a function on anything with a Validate instance (usually Either) as if it were a function on Validation This can be thought of as having the type
(Either e a -> Either e' a') -> Validation e a -> Validation e' a'
-
http-client Network.HTTP.Client.Internal No documentation available.
prettyValidation :: Validation -> Maybe Stringvalidity Data.Validity Render a Validation in a somewhat pretty way. This function will return Nothing if the Validation concerned a valid value.
trivialValidation :: a -> Validationvalidity Data.Validity Declare any value to be valid in validation
trivialValidation a = seq a mempty