From 18c241ff7a53625c6f3c4e6f20ee8df5bb37ddf3 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Mon, 26 Sep 2022 23:28:51 +0300 Subject: Add kinds of fixes and stuff --- app/Main.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app') 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) -- cgit v1.3