1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 05:41:54 +03:00

Define a helper to provide a ToTags instance for à la carte terms.

This commit is contained in:
Rob Rix 2019-10-01 11:58:04 -04:00
parent 1bc251183e
commit 09f95d6cec
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -97,3 +97,9 @@ tagToSymbol Tag{..} = Symbol
, span = converting #? span
, docs = fmap Docstring docs
}
data ALaCarteTerm syntax ann = ALaCarteTerm Language (Term syntax ann)
instance IsTaggable syntax => Precise.ToTags (ALaCarteTerm syntax) where
tags source (ALaCarteTerm lang term) = runTagging lang source symbolsToSummarize term