Verified Commit 82273358 authored by Camil Staps's avatar Camil Staps 🚀

Updates for change to {#Index}

parent 56b15eb7
...@@ -270,6 +270,7 @@ writeTypeTree :: !*CloogleDB !*File -> *(*CloogleDB, *File) ...@@ -270,6 +270,7 @@ writeTypeTree :: !*CloogleDB !*File -> *(*CloogleDB, *File)
getIndex :: !Index !*CloogleDB -> *(Entry CloogleEntry Annotation, *CloogleDB) getIndex :: !Index !*CloogleDB -> *(Entry CloogleEntry Annotation, *CloogleDB)
getIndices :: ![Index] !*CloogleDB -> *([Entry CloogleEntry Annotation], *CloogleDB) getIndices :: ![Index] !*CloogleDB -> *([Entry CloogleEntry Annotation], *CloogleDB)
getIndices` :: !{#Index} !*CloogleDB -> *([Entry CloogleEntry Annotation], *CloogleDB)
filterDB :: (CloogleEntry -> Bool) !*CloogleDB -> *CloogleDB filterDB :: (CloogleEntry -> Bool) !*CloogleDB -> *CloogleDB
excludeCore :: !*CloogleDB -> *CloogleDB excludeCore :: !*CloogleDB -> *CloogleDB
......
...@@ -347,6 +347,11 @@ getIndices idxs wrap=:{db} ...@@ -347,6 +347,11 @@ getIndices idxs wrap=:{db}
# (es,db) = 'Database.Native'.getIndices idxs db # (es,db) = 'Database.Native'.getIndices idxs db
= (es, {wrap & db=db}) = (es, {wrap & db=db})
getIndices` :: !{#Index} !*CloogleDB -> *([Entry CloogleEntry Annotation], *CloogleDB)
getIndices` idxs wrap=:{db}
# (es,db) = 'Database.Native'.getIndices` idxs db
= (es, {wrap & db=db})
filterDB :: (CloogleEntry -> Bool) !*CloogleDB -> *CloogleDB filterDB :: (CloogleEntry -> Bool) !*CloogleDB -> *CloogleDB
filterDB f db = {db & db = 'Database.Native'.search Intersect (\v -> (f v, [])) db.db} filterDB f db = {db & db = 'Database.Native'.search Intersect (\v -> (f v, [])) db.db}
......
...@@ -193,7 +193,7 @@ makeResult orgsearchtype allsyns usedsyns (entry, annots) db ...@@ -193,7 +193,7 @@ makeResult orgsearchtype allsyns usedsyns (entry, annots) db
// Derivations // Derivations
# (derivs,db) = case fe.fe_derivations of # (derivs,db) = case fe.fe_derivations of
Nothing -> (Nothing, db) Nothing -> (Nothing, db)
Just ds -> appFst Just $ getIndices ds db Just ds -> appFst Just $ getIndices` ds db
= (Just $ FunctionResult ( = (Just $ FunctionResult (
{ general { general
& distance = distance entry annots & distance = distance entry annots
...@@ -234,8 +234,8 @@ makeResult orgsearchtype allsyns usedsyns (entry, annots) db ...@@ -234,8 +234,8 @@ makeResult orgsearchtype allsyns usedsyns (entry, annots) db
| entry =: (TypeDefEntry _) | entry =: (TypeDefEntry _)
# (TypeDefEntry tde) = entry # (TypeDefEntry tde) = entry
# (insts,db) = getIndices tde.tde_instances db # (insts,db) = getIndices` tde.tde_instances db
# (derivs,db) = getIndices tde.tde_derivations db # (derivs,db) = getIndices` tde.tde_derivations db
= (Just $ TypeResult ( = (Just $ TypeResult (
{ general { general
& documentation = docDescription =<< tde.tde_doc & documentation = docDescription =<< tde.tde_doc
...@@ -262,8 +262,8 @@ makeResult orgsearchtype allsyns usedsyns (entry, annots) db ...@@ -262,8 +262,8 @@ makeResult orgsearchtype allsyns usedsyns (entry, annots) db
| entry =: (ClassEntry _) | entry =: (ClassEntry _)
# (ClassEntry ce) = entry # (ClassEntry ce) = entry
# (ies,db) = getIndices ce.ce_instances db # (ies,db) = getIndices` ce.ce_instances db
# (mems,db) = getIndices ce.ce_members db # (mems,db) = getIndices` ce.ce_members db
= (Just $ ClassResult ( = (Just $ ClassResult (
{ general { general
& documentation = docDescription =<< ce.ce_documentation & documentation = docDescription =<< ce.ce_documentation
......
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