From e7a3680052a9b3ef206af4cd934b6a0d61ffb7ad Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 12 Sep 2023 11:57:54 +0200 Subject: Separate reply message for :q --- src/Ghci.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Ghci.hs') diff --git a/src/Ghci.hs b/src/Ghci.hs index ae44881..85081c5 100644 --- a/src/Ghci.hs +++ b/src/Ghci.hs @@ -61,7 +61,7 @@ parseSettingsReply = ParseSettings 200 True parseSettingsPaste :: ParseSettings parseSettingsPaste = ParseSettings 50000 False -data Result a = Error String | Ignored | Return a +data Result a = Error String | Ignored | Return a | Exited deriving (Show) makeGhci :: IO Ghci @@ -95,7 +95,7 @@ runStmtClever ghci pset line = putStrLn "ghci: restarting due to :quit" hFlush stdout ghci' <- makeGhci - return (ghci', Return "") + return (ghci', Exited) _ -> runStmt ghci pset line _ -> runStmt ghci pset line where -- cgit v1.2.3-70-g09d2