Utilities for Char-based iteratee processing.
- printLines :: Iteratee String IO ()
- enumLines :: (ListLike s el, StringLike s, Nullable s, Monad m) => Enumeratee s [s] m a
- enumLinesBS :: Monad m => Enumeratee ByteString [ByteString] m a
- enumWords :: (ListLike s Char, Nullable s, Monad m) => Enumeratee s [s] m a
- enumWordsBS :: Monad m => Enumeratee ByteString [ByteString] m a
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.
enumLinesBS :: Monad m => Enumeratee ByteString [ByteString] m aSource
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
enumWordsBS :: Monad m => Enumeratee ByteString [ByteString] m aSource