corrections

This commit is contained in:
crumbtoo
2023-11-24 00:42:48 -07:00
parent f1f711c9ca
commit 8724df05fe
2 changed files with 10 additions and 9 deletions

View File

@@ -93,6 +93,7 @@ listExample1 = [coreProg|
listExample2 = [coreProg| listExample2 = [coreProg|
cc f x xs = Cons (f x) (map f xs) cc f x xs = Cons (f x) (map f xs)
map f l = caseList# l Nil (cc f) map f l = caseList# l Nil (cc f)
list = Cons 1 (Cons 2 (Cons 3 Nil))
main = map negate# list; main = map negate# list;
|] |]

View File

@@ -462,15 +462,15 @@ dbgProg p = do
hdbgProg :: Program -> Handle -> IO (Node, Stats) hdbgProg :: Program -> Handle -> IO (Node, Stats)
hdbgProg p hio = do hdbgProg p hio = do
-- hPrintf hio "==== Stats ====\n\ hPrintf hio "==== Stats ====\n\
-- \result : %s\n\ \result : %s\n\
-- \allocations : %4d\n\ \allocations : %4d\n\
-- \reductions : %4d\n\ \reductions : %4d\n\
-- \dereferences : %4d\n\n" \dereferences : %4d\n\n"
-- (show res) (show res)
-- (sts ^. stsAllocations) (sts ^. stsAllocations)
-- (sts ^. stsReductions) (sts ^. stsReductions)
-- (sts ^. stsDereferences) (sts ^. stsDereferences)
(hPutStr hio . prettyShow) `traverse_` p' (hPutStr hio . prettyShow) `traverse_` p'
pure (res, sts) pure (res, sts)
where where