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 importing them.
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:
hGetLine
hGetContents
hGet
hGetNonBlocking
hPutStr
Methods
hGetLine :: Handle -> IO fullReads a line from the specified handle
hGetContents :: Handle -> IO fullRead entire handle contents. May be done lazily like
System.IO.hGetContents.hGet :: Handle -> Int -> IO fullRead specified number of bytes. See
System.IO.hGetfor particular semantics.hGetNonBlocking :: Handle -> Int -> IO fullNon-blocking read. See
System.IO.hGetNonBlockingfor more.hPutStr :: Handle -> full -> IO ()Writing entire data.
hPutStrLn :: Handle -> full -> IO ()Write data plus newline character.
getLine :: IO fullRead one line
getContents :: IO fullRead entire content from stdin. See hGetContents.
putStr :: full -> IO ()Write data to stdout.
putStrLn :: full -> IO ()Write data plus newline character to stdout.
interact :: (full -> full) -> IO ()Interact with stdin and stdout by using a function to transform input to output. May be lazy. See
System.IO.interactfor more.readFile :: FilePath -> IO fullRead file. May be lazy.
writeFile :: FilePath -> full -> IO ()Write data to file.
appendFile :: FilePath -> full -> IO ()Append data to file.
Instances13ListLikeIO, …
ListLikeIO CharString CharDefined in ListLike-4.7.8.4 · Data.ListLike.CharStringListLikeIO CharStringLazy CharDefined in ListLike-4.7.8.4 · Data.ListLike.CharStringListLikeIO Chars CharDefined in ListLike-4.7.8.4 · Data.ListLike.CharsListLikeIO ByteString Word8Defined in ListLike-4.7.8.4 · Data.ListLike.Instances · orphanListLikeIO ByteString Word8Defined in ListLike-4.7.8.4 · Data.ListLike.Instances · orphanListLikeIO String CharDefined in ListLike-4.7.8.4 · Data.ListLike.Instances · orphanListLikeIO Text CharDefined in ListLike-4.7.8.4 · Data.ListLike.Text.Text · orphanListLikeIO Builder CharDefined in ListLike-4.7.8.4 · Data.ListLike.Text.Builder · orphanListLikeIO Text CharDefined in ListLike-4.7.8.4 · Data.ListLike.Text.TextLazy · orphanListLikeIO (Seq Char) CharDefined in ListLike-4.7.8.4 · Data.ListLike.Instances · orphanListLikeIO (UTF8 ByteString) CharDefined in ListLike-4.7.8.4 · Data.ListLike.UTF8 · orphanListLikeIO (UTF8 ByteString) CharDefined in ListLike-4.7.8.4 · Data.ListLike.UTF8 · orphan(Integral i, Ix i) => ListLikeIO (Array i Char) CharDefined in ListLike-4.7.8.4 · Data.ListLike.Instances · orphan