Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
v0.2 style encoding combinators
Since: 0.3.0.0
Synopsis
- _implEncFromString :: forall nm err a c str. (KnownSymbol nm, Show err) => (Enc '[nm] () str -> Either err a) -> Encoding (Either EncodeEx) nm (AlgNm nm) c str
- _implEncodingP :: forall nm f c str. Applicative f => (str -> str) -> Encoding f nm (AlgNm nm) c str
- _implEncodingConfP :: forall nm f c str. Applicative f => (c -> str -> str) -> Encoding f nm (AlgNm nm) c str
- _implEncodingEx :: forall nm err c str. (KnownSymbol nm, Show err) => (str -> Either err str) -> Encoding (Either EncodeEx) nm (AlgNm nm) c str
- _implEncodingEncodeEx :: forall nm c str. KnownSymbol nm => (str -> Either EncodeEx str) -> Encoding (Either EncodeEx) nm (AlgNm nm) c str
- _implEncodingConfEx :: forall nm err c str. (KnownSymbol nm, Show err) => (c -> str -> Either err str) -> Encoding (Either EncodeEx) nm (AlgNm nm) c str
- implEncodingP :: forall nm f c str. Applicative f => (str -> str) -> Encoding f nm nm c str
- implEncodingEx :: forall nm err c str. (KnownSymbol nm, Show err) => (str -> Either err str) -> Encoding (Either EncodeEx) nm nm c str
- implEncodingEx' :: forall alg nm err c str. (KnownSymbol nm, Show err) => (str -> Either err str) -> Encoding (Either EncodeEx) nm alg c str
- implEncodingEncodeEx' :: forall alg nm c str. KnownSymbol nm => (str -> Either EncodeEx str) -> Encoding (Either EncodeEx) nm alg c str
Documentation
_implEncFromString :: forall nm err a c str. (KnownSymbol nm, Show err) => (Enc '[nm] () str -> Either err a) -> Encoding (Either EncodeEx) nm (AlgNm nm) c str Source #
Create "r-"
- like encoding based on fromEncF
like function.
Useful for small not performance critical encoding since it executed provided fromEnc
function
to verify the encoding
this method does not restrict nm
to follow "r-" naming convention but is expected to be used to define "r-"
encoding.
Compiler figures out algorithm, these appear fast enough
_implEncodingP :: forall nm f c str. Applicative f => (str -> str) -> Encoding f nm (AlgNm nm) c str Source #
_implEncodingConfP :: forall nm f c str. Applicative f => (c -> str -> str) -> Encoding f nm (AlgNm nm) c str Source #
_implEncodingEx :: forall nm err c str. (KnownSymbol nm, Show err) => (str -> Either err str) -> Encoding (Either EncodeEx) nm (AlgNm nm) c str Source #
_implEncodingEncodeEx :: forall nm c str. KnownSymbol nm => (str -> Either EncodeEx str) -> Encoding (Either EncodeEx) nm (AlgNm nm) c str Source #
_implEncodingConfEx :: forall nm err c str. (KnownSymbol nm, Show err) => (c -> str -> Either err str) -> Encoding (Either EncodeEx) nm (AlgNm nm) c str Source #
Assume alg ~ nm
or explicit alg
implEncodingP :: forall nm f c str. Applicative f => (str -> str) -> Encoding f nm nm c str Source #
implEncodingEx :: forall nm err c str. (KnownSymbol nm, Show err) => (str -> Either err str) -> Encoding (Either EncodeEx) nm nm c str Source #
implEncodingEx' :: forall alg nm err c str. (KnownSymbol nm, Show err) => (str -> Either err str) -> Encoding (Either EncodeEx) nm alg c str Source #
implEncodingEncodeEx' :: forall alg nm c str. KnownSymbol nm => (str -> Either EncodeEx str) -> Encoding (Either EncodeEx) nm alg c str Source #