In translating the library, we had to change names to conform with
Haskell's lexical syntax: function names and names of constants must start
with a lowercase letter; type names must start with an uppercase letter.
The case of the remaining letters is unchanged.
In addition, we chose to take advantage of Haskell's module system to
allow us to drop common prefixes (X, XA_, etc.) attached to X11
We named enumeration types so that function types would be easier
to understand. For example, we added Status, WindowClass, etc.
Note that the types are synonyms for Int so no extra typesafety was
We consistently raise exceptions when a function returns an error code.
In practice, this only affects the following functions because most Xlib
functions do not return error codes: allocColor, allocNamedColor,
fetchBuffer, fetchBytes, fontFromGC, getGeometry, getIconName,
iconifyWindow, loadQueryFont, lookupColor, openDisplay,
parseColor, queryBestCursor, queryBestSize, queryBestStipple,
queryBestTile, rotateBuffers, selectInput, storeBuffer,