diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-06 18:25:47 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-06 18:25:47 +0200 |
| commit | 4de1c9b9159305a664a56589b9b6aa1bce0129aa (patch) | |
| tree | 949ee8f99d7fc3bae176e094b4a66f310a21ddfd /app | |
| parent | 765d25857b0472e3f9df89ac822ad36ea0502466 (diff) | |
Refactor -e option into -E and -e
Diffstat (limited to 'app')
| -rw-r--r-- | app/Main.hs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/Main.hs b/app/Main.hs index 0bfda2c..6b3a543 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -16,7 +16,9 @@ parseArgs config args = ("-h":rest) -> parseArgs config { configShowHelp = True } rest ("-e":rest) -> parseArgs - config { configPrintEvaled = True } rest + config { configPrintEvaled = PrintEvaledNonUnit } rest + ("-E":rest) -> parseArgs + config { configPrintEvaled = PrintEvaledAll } rest ("-s":rest) -> parseArgs config { configPrintCallStack = True } rest ("-r":rest) -> parseArgs @@ -51,7 +53,7 @@ main = do configScriptFileName = Nothing, configVerboseMode = False, configShowHelp = False, - configPrintEvaled = False, + configPrintEvaled = PrintEvaledOff, configPrintCallStack = False, configUseREPL = False } @@ -64,9 +66,11 @@ main = do if (configShowHelp config) then 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" + putStrLn $ " " ++ progName ++ " -v # to show verbose debugging information" + putStrLn $ " " ++ progName ++ " -i scriptFile # to run script file" + putStrLn $ " " ++ progName ++ " -e # to print non-unit results of evaluated expressions to stdout" + putStrLn $ " " ++ progName ++ " -E # to print all results of evaluated expressions to stdout" putStrLn $ " " ++ progName ++ " -s # to automatically print call stack of evaluated expressions to stdout" putStrLn $ " " ++ progName ++ " -r # to open REPL, even after script file execution" else do |
