A utf8 char parser can be used to implement the current utf8 decode function in a modular way. Just as we can use an unfold to encode a stream (see https://github.com/composewell/streamly/pull/1055).
In module `Streamly.Internal.Unicode.Char
-- Decode a single Char from UTF8 input
parser/char :: Parser m Word8 Char
In module `Streamly.Internal.Unicode.Latin1
-- Decode a single Char from Latin1 input
parser/char :: Parser m Word8 Char
There is a parseCharUtf8With now. Keeping this issue open to implement a parseCharLatin1.
Currently the parseCharUtf8With in Unicode.Stream, we should probably move it to Unicode.Char
A utf8 char parser can be used to implement the current utf8 decode function in a modular way. Just as we can use an unfold to encode a stream (see https://github.com/composewell/streamly/pull/1055).
In module `Streamly.Internal.Unicode.Char
In module `Streamly.Internal.Unicode.Latin1