On 2008 Aug 17, at 20:34, Spencer Janssen wrote:
On Sat, Aug 16, 2008 at 04:07:25PM -0500, Antoine Latter wrote:
Since the request to create a window has so many parameters, these
parameters are all wrapped up into a "CreateWindow" data type, which
is only ever used by the "createWindow" function.  The "mapWindow"
request only has one parameter, so it does not need it's own
"MapWindow" data type.

I think this is a nice idea. This type signature from the X11 library is
absolutely unmanageable:

It's never been manageable, even from C (hence XCreateSimpleWindow() in Xlib which defaults most of that).

do h <- getHandler c -- save the old handler so we can restore it later
      setHandler c myHandlingFn
      performSomeActionsWhichMayFail
      setHandler c h

Not only is this code ugly, it does not work correctly when the connection may
be concurrently used by several threads.

or when the async response comes after the handler's been reset (i.e. you need to call XSynchronize() and handle any errors before resetting the handler).

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to