diff options
-rw-r--r-- | src/Ghci.hs | 3 |
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 |