binrep-0.8.0: Encode precise binary representations directly in types
Safe HaskellSafe-Inferred
LanguageGHC2021

Binrep.Type.Text.Encoding.Ascii

Synopsis

Documentation

data Ascii Source #

7-bit

Instances

Instances details
Decode Ascii Source # 
Instance details

Defined in Binrep.Type.Text.Encoding.Ascii

Encode Ascii Source #

We reuse UTF-8 encoding for ASCII, since it is a subset of UTF-8.

Instance details

Defined in Binrep.Type.Text.Encoding.Ascii

Methods

encode' :: Text -> Bytes Source #

Predicate Ascii Text Source #

Text must be validated if you want to permit 7-bit ASCII only.

TODO there should be a MUCH faster check here in text-2.0. text-short has it, text doesn't yet. see: https://github.com/haskell/text/issues/496

Instance details

Defined in Binrep.Type.Text.Encoding.Ascii

catchErrorCall :: (a -> b) -> a -> Either String b Source #