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

Safe HaskellNone
LanguageHaskell98

Data.Textual.Encoding

Synopsis

Documentation

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

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

Methods

encodeUtf8 :: textual -> binary Source

decodeUtf8 :: binary -> textual Source

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]