Hugs and GHC provide a common set of libraries to aid portability. This document specifies the interfaces to these libraries and documents known differences. It is the hope of the GHC team that these libraries in the long run become part of every Haskell system.
The set of interfaces specified in this document try to adhere to the following naming conventions:
Actions that create a new values have the prefix new followed by the name of the type of object they're creating, e.g., newIORef, newChan etc.
Operations that read a value from a mutable object are prefixed with read, and operations that update the contents have the prefix write, e.g., readChan, readIOArray. Notes:
This differs from the convention used to name the operations for reading and writing to a file Handle, where get and put are used instead.
Operations provided by various concurrency abstractions, e.g., MVar, CVar , also deviate from this naming scheme. This is perhaps defensible, since the read and write operations have additional behaviour, e.g., takeMVar tries to read the current value of an MVar, locking it if it succeeds.
Conversions operators have the form AToB where A and B are the types we're converting between.
Operations that lazily read values from a mutable object/handle, have the form getXContents, e.g., Channel.getChanContents and IO.hGetContents. (OK, so the latter isn't called getHandleContents, but you hopefully get the picture.)