shithub: MicroHs

Download patch

ref: 5a2593dc1185d6b5597e53c8d4d05a31f8462624
parent: 5941bba1101640f733e4c52a506c5ee31b6558a6
author: Lennart Augustsson <lennart@augustsson.net>
date: Sun Sep 1 07:36:43 EDT 2024

Sadly, don't rnf before saving the cache.

Doing so causes chaos, because rnf does not stop properly
with unevaluated thunks.

--- a/src/MicroHs/Compile.hs
+++ b/src/MicroHs/Compile.hs
@@ -79,7 +79,9 @@
   when (writeCache flags) $ do
     when (verbosityGT flags 0) $
       putStrLn $ "Saving cache " ++ show mhsCacheName
-    () <- seq (rnfNoErr cash) (return ())
+    -- This causes all kinds of chaos, probably because there
+    -- will be equality tests of unevaluated thunks.
+    -- () <- seq (rnfNoErr cash) (return ())
     saveCache mhsCacheName cash
 
 compile :: Flags -> IdentModule -> Cache -> IO ((IdentModule, [LDef]), Symbols, Cache)
--