aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2022-06-14 18:57:39 +0200
committerTom Smeding <tom@tomsmeding.com>2022-06-14 18:57:39 +0200
commit971a56735cddf95aa11cd540ec362fd5e56e1205 (patch)
tree492014ad139fd3e57c080a2ec77aa9038dfef700 /src
parent30e9ed96f3a7683f6a23e689f666ef4a8948e3be (diff)
More logging
Diffstat (limited to 'src')
-rw-r--r--src/Ghci.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Ghci.hs b/src/Ghci.hs
index fbbaa65..13eb4ca 100644
--- a/src/Ghci.hs
+++ b/src/Ghci.hs
@@ -62,6 +62,7 @@ runStmtClever ghci line =
| "def" `startsWith` cmd -> return (ghci, Ignored)
| "quit" `startsWith` cmd -> do
terminateGhci ghci
+ putStrLn "ghci: restarting due to :quit"
ghci' <- makeGhci
return (ghci', Return "")
_ -> runStmt ghci line
@@ -78,11 +79,13 @@ restarting numExcRestarts f ghci = do
closed <- hIsClosed (ghciStdin ghci)
ghci' <- if closed
then do
+ putStrLn "ghci: restarting due to closed stdin"
terminateGhci ghci
makeGhci
else return ghci
(f ghci' >>= \x -> return (ghci', Return x))
`catch` (\e -> do let _ = e :: SomeException
+ putStrLn $ "ghci: restarting due to exception: " ++ show e
terminateGhci ghci'
ghci'' <- makeGhci
if numExcRestarts >= 1