
10 Jun
2007
10 Jun
'07
4:28 p.m.
Example: main = readFile "/dev/input/mouse" >>= mapM print . streamToEvents That's no easy. Now I want to listen to those events remotely using a network conncetion Data.Network does provide everything I need. Is this done by substituting the print function with something like sent event = do writers <- getWritersFromMVar mapM (sent event) writers and using another lightweight thread to add writers/connections to the MVar? Would you implement this in another way? Marc