Verified Commit 75ecc6fa authored by Camil Staps's avatar Camil Staps 🚀

Really resolve clean-cloogle/cloogle.org#188 for the specific case of usages

parent 367c9e4d
......@@ -453,7 +453,7 @@ filterUsages :: ![String] !*CloogleDB -> *CloogleDB
filterUsages names wrap=:{db,name_map}
// For each name, the corresponding entries
# idxss = map (fromMaybe [] o flip get name_map) names
# db = 'DB'.searchIndices Intersect (sort [(i,[(ExactResult,1)]) \\ is <- idxss, i <- is]) db
# db = 'DB'.searchIndices Intersect (sort [(i,[(ExactResult,1)]) \\ is <- idxss, i <- is]) db
// For all lists of entries, the corresponding usages
# (entriess,db) = mapSt 'DB'.getIndices idxss db
# usagess = map (foldr mergeUnion [] o map \e -> getUsages e.value) entriess
......@@ -461,6 +461,11 @@ filterUsages names wrap=:{db,name_map}
# usages = case usagess of
[] -> []
us -> foldr1 mergeIntersect us
# (es,db) = 'DB'.getIndices usages db
# usages = [(case e of
FunctionEntry {fe_typedef=Just i} -> i
FunctionEntry {fe_class=Just i} -> i
_ -> u) \\ u <- usages & {value=e} <- es]
# db = 'DB'.searchIndices AddExcluded [(u,[]) \\ u <- usages] db
= {wrap & db=db}
where
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment