Safe Haskell | None |
---|
Data.Conduit.Text
Contents
Description
Handle streams of text.
Parts of this code were taken from enumerator and adapted for conduits.
- data Codec
- encode :: MonadThrow m => Codec -> Conduit Text m ByteString
- decode :: MonadThrow m => Codec -> Conduit ByteString m Text
- utf8 :: Codec
- utf16_le :: Codec
- utf16_be :: Codec
- utf32_le :: Codec
- utf32_be :: Codec
- ascii :: Codec
- iso8859_1 :: Codec
- lines :: Monad m => Conduit Text m Text
- data TextException
Text codecs
encode :: MonadThrow m => Codec -> Conduit Text m ByteStringSource
Convert text into bytes, using the provided codec. If the codec is not capable of representing an input character, an exception will be thrown.
Since 0.3.0
decode :: MonadThrow m => Codec -> Conduit ByteString m TextSource
Convert bytes into text, using the provided codec. If the codec is not capable of decoding an input byte sequence, an exception will be thrown.
Since 0.3.0
data TextException Source
Since 0.3.0
Constructors
DecodeException Codec Word8 | |
EncodeException Codec Char | |
TextException SomeException |