From 6e54de12b250a9630e2e035588687c7bd7054b17 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 3 Nov 2023 09:54:14 -0700 Subject: [PATCH] ;tools:ghci :rmain --- .ghci | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.ghci b/.ghci index e1e5a2a0d..45ca3ff8e 100644 --- a/.ghci +++ b/.ghci @@ -20,6 +20,9 @@ setEnv "NO_COLOR" "1" -- -- :reload and run commands in .ghci2 -- :def R \_ -> return ":reload\n:script .ghci2" +-- Reload (to flush cached unsafe IO values) and run main with the given args +:def rmain \args -> return $ ":reload\n:main "<>args + -- -- run commands from a file, .ghci2 by default -- :def s \f -> readFile $ if null f then ".ghci2" else f