Haskell is a wonderful language and I am tempted to use it everywhere but I have had to turn it down for many tasks due to a very simple little shortcoming in the language.. there is no way to communicate with the outside world in any predefined binary format. I am not talking about pickling or persistence or any of that but just the raw ability to read in binary files in a specified format without resorting to calling external function via the FFI or writing code dependent on unspecified behavior of a compiler (8 bit Chars for instance.). to remedy this, I propose this very simple module be added.. module BIO(Byte, hByteFileSize, hByteSeek, hGetByte, hPutByte, hByteGetContents, hByteRead, hByteWrite) where import Word(Word8) -- this may be defined differently for other compilers.. type Byte = Word8 hByteFileSize :: Handle -> IO Integer hByteSeek :: Handle -> SeekMode -> Integer -> IO () hGetByte :: Handle -> IO Byte hPutByte :: Handle -> Byte -> IO () hByteGetContents :: Handle -> IO [Byte] hByteRead :: Handle -> Integer -> IO [Byte] hByteWrite :: Handle -> [Byte] -> IO () I am not saying that we change the Haskell spec or anything, simply that this module be added to hslibs and be promoted to a 'standard way to be non-standard' status. too much code that exists out there makes the assumption that Char == Byte == Octet == 8 bits. we should not be stuck with C's legacy! the definition of Byte as a type will help out incredibly, I have seen to many modules that define type Byte = Char, even the POSIX stuff in hslibs does it; the existence of a 'proper' definition of Byte will at least encourage people to write more standards compliant code.. note that this is necessary to even read in text in a format other than your native one, for instance I have written programs which needed to deal with both UTF8 and Latin1 text. both are trivially converted to-from byte streams in Haskell but there is no way to get a raw byte stream. the reason for the different Seeks is that hByteSeek is guaranteed to seek to the byte number given, independent of the host character format, mixing of h* and hByte* seeking functions should be considered to have undefined behavior as it depends on the native character encoding. I hope people see the value in doing something like this, it is frustrating to not be able to write even the basic-est of programs without having to resort to implementation issues or overpowered extensions when all I want is a simple deterministic defined interface to the outside world. PS. if people don't like the word Byte, Octet is also acceptable.