chunked-data-0.1.0.1: Typeclasses for dealing with various chunked data representations

Safe HaskellNone

Data.Textual.Encoding

Synopsis

Documentation

class (Textual textual, IsSequence binary) => Utf8 textual binary | textual -> binary, binary -> textual whereSource

Textual data which can be encoded to and decoded from UTF8.

Methods

encodeUtf8 :: textual -> binarySource

decodeUtf8 :: binary -> textualSource

Note that this function is required to be pure. In the case of a decoding error, Unicode replacement characters must be used.

Instances

Utf8 Text ByteString 
Utf8 Text ByteString 
(~ * c Char, ~ * w Word8) => Utf8 [c] [w]