iteratee-mtl-0.5.0.0: Iteratee-based I/O

Data.Iteratee.Char

Contents

Description

Utilities for Char-based iteratee processing.

Synopsis

Word and Line processors

printLines :: Iteratee String IO ()Source

Print lines as they are received. This is the first impure iteratee with non-trivial actions during chunk processing

enumLines :: (ListLike s el, StringLike s, Nullable s, Monad m) => Enumeratee s [s] m aSource

Convert the stream of characters to the stream of lines, and apply the given iteratee to enumerate the latter. The stream of lines is normally terminated by the empty line. When the stream of characters is terminated, the stream of lines is also terminated. This is the first proper iteratee-enumerator: it is the iteratee of the character stream and the enumerator of the line stream.

enumWords :: (ListLike s Char, Nullable s, Monad m) => Enumeratee s [s] m aSource

Convert the stream of characters to the stream of words, and apply the given iteratee to enumerate the latter. Words are delimited by white space. This is the analogue of List.words