1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 13:51:44 +03:00

Use ToTags for the legacy tagging API as well.

This commit is contained in:
Rob Rix 2019-10-01 12:10:51 -04:00
parent f092a3017c
commit f9c20bc462
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -43,7 +43,7 @@ legacyParseSymbols blobs = Legacy.ParseTreeSymbolResponse <$> distributeFoldMap
symbolsToSummarize = ["Function", "Method", "Class", "Module"] symbolsToSummarize = ["Function", "Method", "Class", "Module"]
renderToSymbols :: (IsTaggable f, Applicative m) => Term f Loc -> m [Legacy.File] renderToSymbols :: (IsTaggable f, Applicative m) => Term f Loc -> m [Legacy.File]
renderToSymbols = pure . pure . tagsToFile . runTagging (blobLanguage blob) blobSource symbolsToSummarize renderToSymbols = pure . pure . tagsToFile . Precise.tags blobSource . ALaCarteTerm (blobLanguage blob) symbolsToSummarize
tagsToFile :: [Tag] -> Legacy.File tagsToFile :: [Tag] -> Legacy.File
tagsToFile tags = Legacy.File (pack (blobPath blob)) (pack (show (blobLanguage blob))) (fmap tagToSymbol tags) tagsToFile tags = Legacy.File (pack (blobPath blob)) (pack (show (blobLanguage blob))) (fmap tagToSymbol tags)