Wed, 28 Mar 2001 04:17:39 -0800 (PST)
--- Andre W B Furtado <firstname.lastname@example.org> wrote:
> [Sorry about the previous email subject :) ]
> In Hugs Graphics Library, many procedures call the
> function getEvent with a Window as the parameter.
> But getEvent is defined as below:
> getEvent :: Events -> IO Event
> How does this work? I've tryied to do something
> similar and got the following error message (in
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
where getWindowEvent pulls out the Events from
a window and calls Events.getEvent :: Events-> IO
(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)
Of course I am just speculating. I didnt write it :)
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.