conduit-0.0.0.1: A pull-based approach to streaming data.

Data.Conduit.Text

Contents

Description

Handle streams of text.

Parts of this code were taken from enumerator and adapted for conduits.

Synopsis

Text codecs

data Codec Source

A specific character encoding.

Instances

encode :: ResourceThrow 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.

decode :: ResourceThrow 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.