Portability | portable |
---|---|
Maintainer | jmillikin@gmail.com |
Enumerator-based text IO
- enumHandle :: Handle -> Enumerator SomeException Text IO b
- enumFile :: FilePath -> Enumerator SomeException Text IO b
- iterHandle :: Handle -> Iteratee SomeException Text IO ()
- iterFile :: FilePath -> Iteratee SomeException Text IO ()
- data Codec
- encode :: Monad m => Codec -> Enumeratee SomeException Text ByteString m b
- decode :: Monad m => Codec -> Enumeratee SomeException 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 :: Handle -> Enumerator SomeException Text IO bSource
enumFile :: FilePath -> Enumerator SomeException Text IO bSource
Opens a file path in text mode, and passes the handle to enumHandle
.
The file will be closed when the Iteratee
finishes.
iterHandle :: Handle -> Iteratee SomeException Text IO ()Source
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.
iterFile :: FilePath -> Iteratee SomeException Text IO ()Source
Opens a file path in text mode, and passes the handle to iterHandle
.
The file will be closed when the Iteratee
finishes.
Codecs
encode :: Monad m => Codec -> Enumeratee SomeException Text ByteString m bSource
decode :: Monad m => Codec -> Enumeratee SomeException ByteString Text m bSource