enumerator-0.4.4: Implementation of Oleg Kiselyov's left-fold enumeratorsContentsIndex
Data.Enumerator.Text
Portabilityportable
Maintainerjmillikin@gmail.com
Contents
Enumerators and iteratees
Codecs
Description
Enumerator-based text IO
Synopsis
enumHandle :: MonadIO m => Handle -> Enumerator Text m b
enumFile :: FilePath -> Enumerator Text IO b
iterHandle :: MonadIO m => Handle -> Iteratee Text m ()
data Codec
encode :: Monad m => Codec -> Enumeratee Text ByteString m b
decode :: Monad m => Codec -> Enumeratee ByteString Text m b
utf8 :: Codec
utf16_le :: Codec
utf16_be :: Codec
utf32_le :: Codec
utf32_be :: Codec
ascii :: Codec
iso8859_1 :: Codec
Enumerators and iteratees
enumHandle :: MonadIO m => Handle -> Enumerator Text m b

Read lines of text from the handle, and stream them to an Iteratee. If an exception occurs during file IO, enumeration will stop and Error will be returned. Exceptions from the iteratee are not caught.

The handle should be opened with an appropriate text encoding, and in ReadMode or ReadWriteMode.

enumFile :: FilePath -> Enumerator Text IO b
Opens a file path in text mode, and passes the handle to enumHandle. The file will be closed when the Iteratee finishes.
iterHandle :: MonadIO m => Handle -> Iteratee Text m ()

Read text from a stream and write it to a handle. If an exception occurs during file IO, enumeration will stop and Error will be returned.

The handle should be opened with an appropriate text encoding, and in WriteMode or ReadWriteMode.

Codecs
data Codec
show/hide Instances
encode :: Monad m => Codec -> Enumeratee Text ByteString m b
decode :: Monad m => Codec -> Enumeratee ByteString Text m b
utf8 :: Codec
utf16_le :: Codec
utf16_be :: Codec
utf32_le :: Codec
utf32_be :: Codec
ascii :: Codec
iso8859_1 :: Codec
Produced by Haddock version 2.7.2