|Maintainer||John Lato <email@example.com>|
Written by John Goerzen, firstname.lastname@example.org
- class ListLike full item => ListLikeIO full item | full -> item where
- hGetLine :: Handle -> IO full
- hGetContents :: Handle -> IO full
- hGet :: Handle -> Int -> IO full
- hGetNonBlocking :: Handle -> Int -> IO full
- hPutStr :: Handle -> full -> IO ()
- hPutStrLn :: Handle -> full -> IO ()
- getLine :: IO full
- getContents :: IO full
- putStr :: full -> IO ()
- putStrLn :: full -> IO ()
- interact :: (full -> full) -> IO ()
- readFile :: FilePath -> IO full
- writeFile :: FilePath -> full -> IO ()
- appendFile :: FilePath -> full -> IO ()
An extension to
ListLike for those data types that support
I/O. These functions mirror those in System.IO for the most part. They
also share the same names; see the comments in Data.ListLike for help
Note that some types may not be capable of lazy reading or writing. Therefore, the usual semantics of System.IO functions regarding laziness may or may not be available from a particular implementation.
Minimal complete definition:
Reads a line from the specified handle
Read entire handle contents. May be done lazily like
Read specified number of bytes. See
Non-blocking read. See
hGetNonBlocking for more.
Writing entire data.
Write data plus newline character.
Read one line
Read entire content from stdin. See
Write data to stdout.
Write data plus newline character to stdout.
Interact with stdin and stdout by using a function to transform
input to output. May be lazy. See
interact for more.
Read file. May be lazy.
Write data to file.
Append data to file.