summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Scanner.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Scanner.hs b/src/Scanner.hs
index 780f9f8..9f0b5ed 100644
--- a/src/Scanner.hs
+++ b/src/Scanner.hs
@@ -20,6 +20,14 @@ import Control.Monad.Writer
import Data.Time.Clock
+-- high level interface
+getKey :: IO String
+getKey = do
+ _ <- hLookAhead stdin -- wait for input
+ ((_, raw_s), _) <- runScanner scan
+ return $ map toChar raw_s
+
+
type P = C
type I = C
type F = C