text-1.2.1.3: An efficient packed Unicode text type.

Copyright | (c) 2009, 2010 Bryan O'Sullivan, (c) 2009 Simon Marlow
License | BSD-style
Maintainer | bos@serpentine.com
Stability | experimental
Portability | GHC
Safe Haskell | None
Language | Haskell98

Data.Text.Internal.IO

Description

Warning: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!

Low-level support for text I/O.

Synopsis

- hGetLineWith :: ([Text] -> t) -> Handle -> IO t
- readChunk :: Handle__ -> CharBuffer -> IO Text

# Documentation

hGetLineWith :: ([Text] -> t) -> Handle -> IO t

Read a single line of input from a handle, constructing a list of decoded chunks as we go. When we're done, transform them into the destination type.

readChunk :: Handle__ -> CharBuffer -> IO Text

Read a single chunk of strict text from a buffer. Used by both the strict and lazy implementations of hGetContents.