typed-encoding-0.5.0.0: Type safe string transformations

Safe HaskellSafe
LanguageHaskell2010

Data.TypedEncoding.Combinators.Common

Contents

Description

Common encoding combinators. This module is re-exported in Data.TypedEncoding

Synopsis

Documentation

>>> :set -XTypeApplications
>>> import qualified Data.Text as T
>>> import           Data.Word

Partial application of encoding decoding recreation

aboveF :: forall (ts :: [Symbol]) xs ys f c str. Functor f => (Enc xs c str -> f (Enc ys c str)) -> Enc (Append xs ts) c str -> f (Enc (Append ys ts) c str) Source #

Any valid transformation of encodings (encoding decoding recreation) can be replayed on top of another encoding stack.

This subsumes various encodePart, decodePart, recreatePart combinators.

Since: 0.3.0.0

above :: forall (ts :: [Symbol]) xs ys c str. (Enc xs c str -> Enc ys c str) -> Enc (Append xs ts) c str -> Enc (Append ys ts) c str Source #

Since: 0.3.0.0

Other

getTransformF :: forall e1 e2 f c s1 s2. Functor f => (Enc e1 c s1 -> f (Enc e2 c s2)) -> c -> s1 -> f s2 Source #

Since: 0.3.0.0