summaryrefslogtreecommitdiffstats
path: root/test5.hs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2014-12-28 22:43:10 +0100
committertv <tv@shackspace.de>2014-12-28 22:43:10 +0100
commit94367adff362275ee85e37e69540a347cc51ba23 (patch)
tree5fa2085c78b72a63eb7574b09a76270d19a3f476 /test5.hs
parentb553a8fb2513fac00363dcaeb44ceeea9be3636c (diff)
cleanup Scanner
Diffstat (limited to 'test5.hs')
-rw-r--r--test5.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/test5.hs b/test5.hs
index 5a682bd..c06f523 100644
--- a/test5.hs
+++ b/test5.hs
@@ -17,7 +17,7 @@ import Control.Exception
import Control.Monad
import Data.Maybe
import Data.Monoid
-import Scanner (scan, runScanner, toChar)
+import Scanner (getKey)
import System.Directory
import System.Environment
import System.Exit
@@ -136,9 +136,7 @@ winchHandler putEvent =
inputHandler :: (Event -> IO ()) -> IO ()
inputHandler putEvent = forever $ do
-- TODO make stdin configurable
- _ <- hLookAhead stdin
- ((_, s), _) <- runScanner scan
- putEvent $ EKey $ map toChar s
+ getKey >>= putEvent . EKey
run :: IO Event -> State -> IO ()