shithub: MicroHs

Download patch

ref: 231d9ec8e59777f366a0f95ed8d7e5bf46742e4e
parent: 2ff4d2ebbe312878f1304c20f443c430f5fd70d6
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Fri Sep 22 09:38:50 EDT 2023

Make :clear empty the cache

--- a/src/MicroHs/Interactive.hs
+++ b/src/MicroHs/Interactive.hs
@@ -36,6 +36,7 @@
     Just ":quit" -> S.liftIO $ putStrLn "Bye"
     Just ":clear" -> S.do
       updateLines (const preamble)
+      S.modify $ \ (ls, flgs, _) -> (ls, flgs, emptyCache)
       repl
     Just s | Just del <- stripPrefixBy eqChar ":del " s -> S.do
       updateLines (unlines . filter (not . isPrefixOfBy eqChar del) . lines)
--