I wanted to have in Haskell a very simple code in which events are handled.
For instance, I'm looking for something like this:
main = do
firstEvent <- waitForEvent
-- Do Something with that... --
waitForEvent = do
letter <- getChar
OR
sth <- getSomethingFromSocket
OR
-- etc --
I wanted to get the first event that take place without the 'busy waiting'.
Thanks!