1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 02:58:36 +03:00

Take in Source, not Text.

This commit is contained in:
Rob Rix 2019-09-24 17:04:22 -04:00
parent 6baa33d0d6
commit 661b414df4
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -13,7 +13,7 @@ import Data.Text as T
import GHC.Generics
import Source.Loc
import Source.Range
import Source.Source
import Source.Source as Source
import Tags.Tag
import qualified Tags.Taggable.Precise as Tags
import qualified TreeSitter.Python.AST as Py
@ -108,7 +108,7 @@ docComment src (R1 (Py.ExpressionStatementSimpleStatement (Py.ExpressionStatemen
docComment _ _ = Nothing
firstLine :: Source -> Text
firstLine = T.take 180 . T.takeWhile (/= '\n') . toText
firstLine = T.takeWhile (/= '\n') . toText . Source.take 180
instance (Generic1 t, Tags.GFoldable1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where