Verified Commit 367c9e4d authored by Camil Staps's avatar Camil Staps 🙂

Cleanup previous commit

parent d1242151
......@@ -524,24 +524,24 @@ removeContainedEntries wrap=:{db}
# (es,db) = 'DB'.getEntriesWithIndices db
= {wrap & db=foldr remove db es}
where
remove :: !(Index, CloogleEntry, Map AnnotationKey Int) !*(NativeDB CloogleEntry AnnotationKey Int)
remove :: !(Index, !CloogleEntry, Map AnnotationKey Int) !*(NativeDB CloogleEntry AnnotationKey Int)
-> *NativeDB CloogleEntry AnnotationKey Int
remove (idx,e,annots`) db = case e of
FunctionEntry {fe_typedef=Just tdi}
# (tde,db) = 'DB'.getIndex tdi db
| not tde.included = db
# newannots = toList (updateAnnots annots tde.annotations)
= 'DB'.searchIndices AddExcluded [(tdi,newannots)] $ 'DB'.unsearchIndices [idx] db
= 'DB'.searchIndex tdi newannots $ 'DB'.unsearchIndex idx db
FunctionEntry {fe_class=Just ci}
# (ce,db) = 'DB'.getIndex ci db
| not ce.included = db
# newannots = toList (updateAnnots annots ce.annotations)
= 'DB'.searchIndices AddExcluded [(ci,newannots)] $ 'DB'.unsearchIndices [idx] db
= 'DB'.searchIndex ci newannots $ 'DB'.unsearchIndex idx db
_ = db
where
annots = toList annots`
updateAnnots :: [(AnnotationKey,Int)] !(Map AnnotationKey Int) -> Map AnnotationKey Int
updateAnnots :: ![(!AnnotationKey,!Int)] !(Map AnnotationKey Int) -> Map AnnotationKey Int
updateAnnots [] m = m
updateAnnots [(NGramDistance,n):as] m = updateAnnots as $
alter (\oldn -> case oldn of
......
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