Verified Commit 669fdc17 authored by Camil Staps's avatar Camil Staps 🚀

Resolve #1: move CloogleServer and builddb functionality to new modules

parent a06d99e0
This diff is collapsed.
definition module Search
from Cloogle import :: Request, :: Result
from TypeDB import :: TypeDB
DEFAULT_INCLUDE_BUILTINS :== True
DEFAULT_INCLUDE_CORE :== False
search :: !Request !TypeDB -> [Result]
This diff is collapsed.
......@@ -47,6 +47,7 @@ instance print (Name, ExtendedType)
getName :: Location -> Name
isBuiltin :: Location -> Bool
isCore :: Location TypeDB -> Bool
functionCount :: TypeDB -> Int
macroCount :: TypeDB -> Int
......
......@@ -108,6 +108,12 @@ isBuiltin :: Location -> Bool
isBuiltin (Builtin _) = True
isBuiltin _ = False
isCore :: Location TypeDB -> Bool
isCore (Builtin _) _ = False
isCore (Location lib mod _ _ _) db = case getModule lib mod db of
Nothing = False
(Just b) = b.is_core
functionCount :: TypeDB -> Int
functionCount {functionmap} = mapSize functionmap
......
definition module TypeDBFactory
from compile import :: DclCache
import TypeDB
setupCache :: *World -> *(*DclCache, *World)
findModules :: ![String] !String !Library (Module -> Bool) !String !*World
-> *(![(Library, Module, Bool)], !*World)
getModuleTypes :: String Module Library Bool
*DclCache TypeDB *World -> *(TypeDB, *DclCache, *World)
constructor_functions :: (Location, TypeDef) -> [(Location, ExtendedType)]
record_functions :: (Location, TypeDef) -> [(Location, ExtendedType)]
This diff is collapsed.
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