on master help sign in
Compilability.
4dc937aMatus Tejiscak
src/IRTS/Compiler.hs+2−2
@@ -51,11 +51,11 @@ compile codegen f tm
51
51
52 -- TODO: DEBUG-ONLY, remove
52 -- TODO: DEBUG-ONLY, remove
53 ist <- getIState
53 ist <- getIState
54− let usedF = findUsed (tt_ctxt ist) (idris_callgraph ist) used
54+ let depMap = buildDepMap (tt_ctxt ist) (idris_callgraph ist) used
55 let printCond (ctors, cond) = "if " ++ show (S.toList cond) ++ " -ctors- " ++ show (S.toList ctors)
55 let printCond (ctors, cond) = "if " ++ show (S.toList cond) ++ " -ctors- " ++ show (S.toList ctors)
56 let printDep (i, conds) = unlines . map (" "++) $ (show i : map printCond (S.toList conds))
56 let printDep (i, conds) = unlines . map (" "++) $ (show i : map printCond (S.toList conds))
57 let printItem (fn, (deps, depns)) = unlines ((show fn ++ " <- " ++ show (S.toList depns)) : map printDep (IM.toList deps))
57 let printItem (fn, (deps, depns)) = unlines ((show fn ++ " <- " ++ show (S.toList depns)) : map printDep (IM.toList deps))
58− iLOG $ "USAGE ANALYSIS:\n" ++ unlines (map printItem . M.toList $ usedF)
58+ iLOG $ "USAGE ANALYSIS:\n" ++ unlines (map printItem . M.toList $ depMap)
59 -- END TODO
59 -- END TODO
60
60
61 maindef <- irMain tm
61 maindef <- irMain tm
src/Idris/Erasure.hs+1−1
@@ -2,7 +2,7 @@
2
2
3module Idris.Erasure
3module Idris.Erasure
4 ( findUnusedArgs
4 ( findUnusedArgs
5− , findUsed
5+ , buildDepMap
6 ) where
6 ) where
7
7
8import Idris.AbsSyntax
8import Idris.AbsSyntax