@@ -51,17 +51,13 @@ compile codegen f tm
51 -- TODO: traverse all names correctly
51 -- TODO: traverse all names correctly
53 -- TODO: DEBUG-ONLY, remove
53 -- TODO: DEBUG-ONLY, remove
55 ist <- getIState
54 ist <- getIState
56 let depMap = buildDepMap (tt_ctxt ist) used
55 let depMap = buildDepMap (tt_ctxt ist) used
57− let printCond (ctors, cond) = "if " ++ show (S.toList cond) ++ " -ctors- " ++ show (S.toList ctors)
58− let printDep (i, conds) = unlines . map (" "++) $ (show i : map printCond (S.toList conds))
59− let printItem (fn, deps) = unlines (show fn : map printDep (IM.toList deps))
56+ let printItem (cond, deps) = show (S.toList cond) ++ " -> " ++ show (S.toList deps)
60 iLOG $ "USAGE ANALYSIS:\n" ++ unlines (map printItem . M.toList $ depMap)
57 iLOG $ "USAGE ANALYSIS:\n" ++ unlines (map printItem . M.toList $ depMap)
62 let minUse = minimalUsage depMap
59 let minUse = minimalUsage depMap
63 iLOG $ "MINIMAL USAGE:\n" ++ unlines (map (\(n,is) -> show n ++ " -> " ++ show (IS.toList is)) $ M.toList minUse)
60 iLOG $ "MINIMAL USAGE:\n" ++ unlines (map (\(n,is) -> show n ++ " -> " ++ show (IS.toList is)) $ M.toList minUse)
65 -- END TODO
61 -- END TODO
67 maindef <- irMain tm
63 maindef <- irMain tm