Verified Commit 48d7b500 authored by Camil Staps's avatar Camil Staps 🚀

Bring up to date with Platform

parent 2b6446a6
......@@ -24,6 +24,9 @@ from Clean.Doc import :: FunctionDoc, :: TypeDoc, :: ClassDoc, :: ModuleDoc
from Cloogle.API import :: FunctionKind, :: SyntaxExample,
:: CleanLangReportLocation, :: ABCArgument, :: LocationResult
NGRAMS_N :== 3
NGRAMS_CI :== True
/**
* A storage for function types, class definitions, type definitions, etc.
*/
......
......@@ -46,6 +46,7 @@ import qualified Data.Map as M
import Data.Maybe
from Data.NGramIndex import :: NGramIndex, newNGramIndex, index
import qualified Data.Set as S
from Data.Set import instance Foldable Set
import Data.Tuple
from Database.Native import :: NativeDB, :: Index(..), newDB,
instance == Index, instance < Index
......@@ -81,6 +82,7 @@ from syntax import :: ClassDef{class_args,class_context,class_ident,class_pos},
from Cloogle.API import :: FunctionKind(..), instance == FunctionKind
import qualified Cloogle.DB as CDB
from Cloogle.DB import
NGRAMS_N, NGRAMS_CI,
:: CloogleDB{..}, :: Annotation,
:: Library,
:: Location(Builtin,NoLocation),
......@@ -161,7 +163,7 @@ instance match [PathPattern] where match ps fp = any (flip match fp) ps
finaliseDB :: ![CloogleEntry] !TemporaryDB -> *'CDB'.CloogleDB
finaliseDB extra tdb =
{ db = 'DB'.mapInPlace link $ newDB entries
, name_ngrams = foldr (uncurry index) (newNGramIndex 3 True)
, name_ngrams = foldr (uncurry index) (newNGramIndex NGRAMS_N NGRAMS_CI)
[('CDB'.getName loc, i) \\ (i,e) <- entridxs, Just loc <- ['CDB'.getLocation e]]
, name_map = foldr (\(name,i) -> flip 'M'.alter name \is -> case is of
Nothing -> Just [i]
......
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