This page is currently being created. Please do not edit.
Rationale and Goals
Haskell 98 specifies and number of I/O actions. All these actions accept and return
Strings are not a good type for performing I/O in all cases. Their structure give them bad cache locality and they take up more memory per byte or character than more compact representations like
ByteStrings. It is also conceptually the wrong type for some operations. For example, sockets receive and send bytes while file I/O often deals in terms of characters and yet both use
String to represent these two different concepts.
We need to first create a low-level API that covers the basic I/O functionality provided by the operating system which other, more high-level libraries can build upon.
The new I/O library resides in the New I/O (NIO) module.
All I/O actions deal in terms of ByteStrings.
read :: Handle -> Int -> IO ByteString write :: Handle -> ByteString -> IO Int tell :: Handle -> IO Integer seek :: Handle -> SeekMode -> Integer -> IO () close :: Handle -> IO ()