The prelude is documented in the Haskell 98 report and the standard libraries in the Haskell 98 libraries report. Low-level deviations of GHC from Haskell '98 are noted in Section 7.19 in The Glasgow Haskell Compiler User's Guide, Version 5.02; deviations from the standard libraries are noted below.
On Windows, reading a file in text mode (which is the default) will translate CRLF to LF, and writing will translate LF to CRLF. This is usually what you want with text files. With binary files this is undesirable; also, as usual under Microsoft operating systems, text mode treats control-Z as EOF.
is implemented using Windows's native system call, which ignores the SHELL environment variable, and always passes the command to the Windows command interpreter (cmd.exe or command.com), hence Unixy shell tricks will not work.
The report says that this function should return the name of the program “as invoked”, which might suggest to Unix types that it should return the equivalent of argv. However, this is hard-to-impossible on some non-Unix OSes, so instead, for maximum portability, we just return the leafname of the program as invoked. Even then there are some differences between platforms: on Windows, for example, a program invoked as foo is probably really foo.exe, and that is what progName will return.