diff options
Diffstat (limited to 'app/Main.hs')
| -rw-r--r-- | app/Main.hs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/app/Main.hs b/app/Main.hs index 88b1782..5dfb25e 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -19,8 +19,8 @@ ppr = , outputOptionsPageWidth = 80 } -interpret :: String -> InputT IO () -interpret = liftIO . lex +interpret :: String -> IO () +interpret = lex where lex input = case MP.parse P.lexPrlg "-" input of @@ -34,15 +34,13 @@ interpret = liftIO . lex main :: IO () main = - runInputT defaultSettings $ do - outputStrLn "PRLG." - loop + runInputT defaultSettings loop where loop :: InputT IO () loop = do - minput <- getInputLine "|= " + minput <- getInputLine "prlg> " case minput of Nothing -> return () Just input -> do - interpret input + liftIO $ interpret input loop |
