getEvent Doubts

Alastair Reid reid@cs.utah.edu
Wed, 28 Mar 2001 12:21:24 -0700


> Actually, this can't work (can it?).
> So there must be another
>  getEvent :: Window -> IO Event.
>  (.i.e. Its sort of  overloaded).
> And so , there is at least one, in SOEGraphics.hs
>   getEvent window = getWindowEvent window

Absolutely correct.

The SOEGraphics interface was frozen at the time that the School of Expression (SOE) book went to the printers.  The HGL interface
has been updated (cleaned up and extended) since and SOEGraphics.hs is used to bridge the gap between the two interfaces.  If you're
using SOE, you should rely on the book as your primary source of information about the interface.  If you're not using SOE, I'd
recommend the HGL interface.

> where getWindowEvent pulls out the Events from
> a window and calls Events.getEvent :: Events-> IO Event
> (The getEvent :: Events-> IO Event is imported
> qualified from GraphicsEvents.hs. I guess this was
> done to avoid defining a type class, and probably
> also because the end user doesnt need the
> Events.getEvent, or at least very much)

More the latter than the former.

Hope this helps,

--
Alastair Reid