diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-09-26 23:28:51 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-05 14:21:53 +0200 |
| commit | 18c241ff7a53625c6f3c4e6f20ee8df5bb37ddf3 (patch) | |
| tree | 7b4df772e103b69b98316a2b902e7d34e6cdbfcb /app | |
| parent | 5fd62d2d3e74e94a8b225f47af074b249ce7f932 (diff) | |
Add kinds of fixes and stuff
Diffstat (limited to 'app')
| -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 0fe5551..d31fef2 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -17,6 +17,8 @@ parseArgs config args = config { configShowHelp = True } rest ("-e":rest) -> parseArgs config { configPrintEvaled = True } rest + ("-s":rest) -> parseArgs + config { configPrintCallStack = True } rest _ -> config repl :: Config -> Env -> InputT IO () @@ -42,7 +44,8 @@ main = do configScriptFileName = Nothing, configVerboseMode = False, configShowHelp = False, - configPrintEvaled = False + configPrintEvaled = False, + configPrintCallStack = False } let config = parseArgs initialConfig args @@ -52,6 +55,7 @@ main = do 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" + putStrLn $ " " ++ progName ++ " -s # to automatically print call stack of evaluated expressions to stdout" else do when (configVerboseMode config) $ do putStrLn $ "configScriptFileName:\t" ++ (show $ configScriptFileName config) |
