From f092a3017cb21c36e829fd63ad5efd69135e3954 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 1 Oct 2019 12:10:38 -0400 Subject: [PATCH] Parameterize ALaCarteTerm by the symbols to summarize. --- src/Semantic/Api/Symbols.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Semantic/Api/Symbols.hs b/src/Semantic/Api/Symbols.hs index e00f85ecd..7898a13fd 100644 --- a/src/Semantic/Api/Symbols.hs +++ b/src/Semantic/Api/Symbols.hs @@ -70,7 +70,7 @@ parseSymbols blobs = do | Precise <- pythonMode modes , Python <- blobLanguage' = catching $ renderToSymbols <$> parse precisePythonParser blob - | otherwise = catching $ withSomeTerm (renderToSymbols . ALaCarteTerm (blobLanguage blob)) <$> doParse blob + | otherwise = catching $ withSomeTerm (renderToSymbols . ALaCarteTerm (blobLanguage blob) symbolsToSummarize) <$> doParse blob where catching m = m `catchError` (\(SomeException e) -> pure $ errorFile (show e)) blobLanguage' = blobLanguage blob @@ -96,7 +96,7 @@ tagToSymbol Tag{..} = Symbol } -data ALaCarteTerm syntax ann = ALaCarteTerm Language (Term syntax ann) +data ALaCarteTerm syntax ann = ALaCarteTerm Language [Text] (Term syntax ann) instance IsTaggable syntax => Precise.ToTags (ALaCarteTerm syntax) where - tags source (ALaCarteTerm lang term) = runTagging lang source symbolsToSummarize term + tags source (ALaCarteTerm lang symbolsToSummarize term) = runTagging lang source symbolsToSummarize term