diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-09-26 14:02:28 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-05 14:21:53 +0200 |
| commit | 2ea2c405746bfa79d3be478f4c8763dd7dd6ac5f (patch) | |
| tree | 39be22d6a3b768e42813e2e5dde4a37a301aafb3 /app/Main.hs | |
| parent | 3f5b15b15fbca3dac18f3f5cb39b7826924ff175 (diff) | |
Add some concept docs
Diffstat (limited to 'app/Main.hs')
| -rw-r--r-- | app/Main.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Main.hs b/app/Main.hs index 113a3ba..0fe5551 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -15,6 +15,8 @@ parseArgs config args = config { configVerboseMode = True } rest ("-h":rest) -> parseArgs config { configShowHelp = True } rest + ("-e":rest) -> parseArgs + config { configPrintEvaled = True } rest _ -> config repl :: Config -> Env -> InputT IO () @@ -39,7 +41,8 @@ main = do let initialConfig = Config { configScriptFileName = Nothing, configVerboseMode = False, - configShowHelp = False + configShowHelp = False, + configPrintEvaled = False } let config = parseArgs initialConfig args @@ -48,6 +51,7 @@ main = do putStrLn $ "Usage: " ++ progName ++ " # to open REPL" putStrLn $ " " ++ progName ++ " -i scriptFile # to run script file" putStrLn $ " " ++ progName ++ " -h # to show this help" + putStrLn $ " " ++ progName ++ " -e # to automatically print results of evaluated expressions to stdout" else do when (configVerboseMode config) $ do putStrLn $ "configScriptFileName:\t" ++ (show $ configScriptFileName config) |
