1
1
mirror of https://github.com/github/semantic.git synced 2025-01-04 21:47:07 +03:00

Don’t pass the blob into tagging.

This commit is contained in:
Rob Rix 2019-10-01 11:50:30 -04:00
parent c0ecbb12b6
commit e9fc6122c4
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
2 changed files with 3 additions and 4 deletions

View File

@ -29,7 +29,6 @@ import Analysis.ConstructorName
import Analysis.HasTextElement import Analysis.HasTextElement
import Data.Abstract.Declarations import Data.Abstract.Declarations
import Data.Abstract.Name import Data.Abstract.Name
import Data.Blob
import Data.Language import Data.Language
import Data.Term import Data.Term
import Data.Text hiding (empty) import Data.Text hiding (empty)
@ -99,10 +98,10 @@ type IsTaggable syntax =
) )
tagging :: (Monad m, IsTaggable syntax) tagging :: (Monad m, IsTaggable syntax)
=> Blob => Language
-> Term syntax Loc -> Term syntax Loc
-> Stream (Of Token) m () -> Stream (Of Token) m ()
tagging b = foldSubterms (descend (blobLanguage b)) tagging = foldSubterms . descend
descend :: descend ::
( ConstructorName (TermF syntax Loc) ( ConstructorName (TermF syntax Loc)

View File

@ -31,7 +31,7 @@ runTagging blob symbolsToSummarize
. evalState @[ContextToken] [] . evalState @[ContextToken] []
. Streaming.toList_ . Streaming.toList_
. contextualizing blob toKind . contextualizing blob toKind
. tagging blob . tagging (blobLanguage blob)
where where
toKind x = do toKind x = do
guard (x `elem` symbolsToSummarize) guard (x `elem` symbolsToSummarize)