summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2014-12-28 22:54:14 +0100
committertv <tv@shackspace.de>2014-12-28 22:54:30 +0100
commit8b1a855a0b6f122e8f9e372bdcaaa8abacddb079 (patch)
tree0df71fbf8e2c1de10ea3f8ade8e4b99424585d5e
parent7ae43658270557bdb5ae6d4d696f351f3a2c56ab (diff)
test5: inline scanner thread
-rw-r--r--test5.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/test5.hs b/test5.hs
index c06f523..a65b719 100644
--- a/test5.hs
+++ b/test5.hs
@@ -114,7 +114,7 @@ startup = do
]
threadIds <- mapM forkIO
- [ inputHandler putEvent
+ [ forever $ getKey >>= putEvent . EKey
, run getEvent q0
]
@@ -133,12 +133,6 @@ winchHandler putEvent =
return ()
-inputHandler :: (Event -> IO ()) -> IO ()
-inputHandler putEvent = forever $ do
- -- TODO make stdin configurable
- getKey >>= putEvent . EKey
-
-
run :: IO Event -> State -> IO ()
run getEvent = rec where
rec q = rec =<<