on master help sign in
Add checkAccessibility stub.
d5726ecMatus Tejiscak
src/Idris/Erasure.hs+6
@@ -70,6 +70,9 @@ performUsageAnalysis = do
70 logLvl 4 $ "Minimal usage:\n" ++ fmtUseMap minUse
70 logLvl 4 $ "Minimal usage:\n" ++ fmtUseMap minUse
71 logLvl 5 $ "Residual deps:\n" ++ unlines (map fmtItem . M.toList $ residDeps)
71 logLvl 5 $ "Residual deps:\n" ++ unlines (map fmtItem . M.toList $ residDeps)
72
72
73+ -- Check that everything reachable is accessible
74+ checkAccessibility minUse
75+
73 -- Store the usage info in the internal state.
76 -- Store the usage info in the internal state.
74 mapM_ storeUsage . M.toList $ minUse
77 mapM_ storeUsage . M.toList $ minUse
75
78
@@ -91,6 +94,9 @@ performUsageAnalysis = do
91 [x] -> addToCG n x{ usedpos = IS.toList args } -- functions
94 [x] -> addToCG n x{ usedpos = IS.toList args } -- functions
92 _ -> addToCG n (CGInfo [] [] [] [] (IS.toList args)) -- data ctors
95 _ -> addToCG n (CGInfo [] [] [] [] (IS.toList args)) -- data ctors
93
96
97+checkAccessibility :: UseMap -> Idris ()
98+checkAccessibility umap = return ()
99+
94-- Find the minimal consistent usage by forward chaining.
100-- Find the minimal consistent usage by forward chaining.
95minimalUsage :: Deps -> (Deps, (Set Name, UseMap))
101minimalUsage :: Deps -> (Deps, (Set Name, UseMap))
96minimalUsage = second gather . forwardChain
102minimalUsage = second gather . forwardChain