aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2022-09-26 14:02:28 +0300
committerJan Tuomi <jans.tuomi@gmail.com>2022-12-05 14:21:53 +0200
commit2ea2c405746bfa79d3be478f4c8763dd7dd6ac5f (patch)
tree39be22d6a3b768e42813e2e5dde4a37a301aafb3 /app
parent3f5b15b15fbca3dac18f3f5cb39b7826924ff175 (diff)
Add some concept docs
Diffstat (limited to 'app')
-rw-r--r--app/Main.hs6
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)