typed-encoding-0.4.0.0: Type safe string transformations

Safe HaskellSafe
LanguageHaskell2010

Data.TypedEncoding.Combinators.Validate

Contents

Description

Combinators re-exported in Data.TypedEncoding.

Decoding combinators that are backward compatible to v0.2 versions.

Since: 0.3.0.0

Synopsis

Validation

checkWithValidations :: forall algs (nms :: [Symbol]) f c str. (Monad f, SymbolList nms) => Validations f nms algs c str -> UncheckedEnc c str -> Maybe (f (Enc nms c str)) Source #

Maybe signals annotation mismatch, effect f is not evaluated unless there is match

check :: forall (nms :: [Symbol]) f c str. (Monad f, ValidateAll f nms nms c str, SymbolList nms) => UncheckedEnc c str -> Maybe (f (Enc nms c str)) Source #

check' :: forall algs (nms :: [Symbol]) f c str. (Monad f, ValidateAll f nms algs c str, SymbolList nms) => UncheckedEnc c str -> Maybe (f (Enc nms c str)) Source #

recreateWithValidations :: forall algs nms f c str. Monad f => Validations f nms algs c str -> Enc ('[] :: [Symbol]) c str -> f (Enc nms c str) Source #

v0.2 style recreate functions

recreateFAll :: forall nms f c str. (Monad f, ValidateAll f nms nms c str) => Enc ('[] :: [Symbol]) c str -> f (Enc nms c str) Source #

recreateAll :: forall nms c str. ValidateAll Identity nms nms c str => Enc ('[] :: [Symbol]) c str -> Enc nms c str Source #

recreateFPart :: forall xs xsf f c str. (Monad f, ValidateAll f xs xs c str) => Enc xsf c str -> f (Enc (Append xs xsf) c str) Source #

Convenience combinators which mimic pre-v0.3 type signatures. These do not try to figure out algs or assume much about them

recreateFAll' :: forall algs nms f c str. (Monad f, ValidateAll f nms algs c str) => Enc ('[] :: [Symbol]) c str -> f (Enc nms c str) Source #

recreateAll' :: forall algs nms c str. ValidateAll Identity nms algs c str => Enc ('[] :: [Symbol]) c str -> Enc nms c str Source #

recreateFPart' :: forall algs xs xsf f c str. (Monad f, ValidateAll f xs algs c str) => Enc xsf c str -> f (Enc (Append xs xsf) c str) Source #

recreatePart' :: forall algs xs xsf c str. ValidateAll Identity xs algs c str => Enc xsf c str -> Enc (Append xs xsf) c str Source #