shithub: MicroHs

Download patch

ref: be24677ceeda07835f48379fe33f05522f1cf661
parent: 20f83a55fa8c814b5584fcfe03ed01feb0b1ba8b
parent: c347fc0dc7ad7c9351f1088e053ba5f975535e67
author: Lennart Augustsson <lennart@augustsson.net>
date: Sun Sep 1 02:21:19 EDT 2024

Merge branch 'master' into bytestring

--- a/Makefile
+++ b/Makefile
@@ -140,7 +140,7 @@
 
 #
 clean:
-	rm -rf src/*/*.hi src/*/*.o *.comb *.tmp *~ bin/* a.out $(GHCOUTDIR) tmp/* Tools/*.o Tools/*.hi dist-newstyle generated/*-stage* .mhscache targets.conf .mhscache dist-mcabal cpphssrc Interactive.hs
+	rm -rf src/*/*.hi src/*/*.o *.comb *.tmp *~ bin/* a.out $(GHCOUTDIR) tmp/* Tools/*.o Tools/*.hi dist-newstyle generated/*-stage* .mhscache targets.conf .mhscache dist-mcabal cpphssrc Interactive.hs .mhsi
 	make clean -f Makefile.emscripten
 	cd tests; make clean
 	-cabal clean
--- 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)
--- a/src/runtime/eval.c
+++ b/src/runtime/eval.c
@@ -2155,6 +2155,7 @@
   case T_TODBL: putsb("toDbl", f); break;
   case T_TOFUNPTR: putsb("toFunPtr", f); break;
   case T_BSFROMUTF8: putsb("fromUTF8", f); break;
+  case T_BSTOUTF8: putsb("toUTF8", f); break;
   case T_TICK:
     putb('!', f);
     print_string(f, tick_table[GETVALUE(n)].tick_name);
@@ -2324,7 +2325,7 @@
     memerr();
   fp->next = ofp;
   fin->back = fp;
-  if (fp->payload.size != NOSIZE)
+  if (ofp->payload.size != NOSIZE)
     fp->payload.size = ofp->payload.size - s;
   fp->payload.string = (uint8_t*)ofp->payload.string + s;
   fp->finalizer = fin;
--