From 661b414df45dc7ff3233224b30d179b0a0d7d504 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 24 Sep 2019 17:04:22 -0400 Subject: [PATCH] Take in Source, not Text. --- semantic-tags/src/Language/Python/Tags.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/semantic-tags/src/Language/Python/Tags.hs b/semantic-tags/src/Language/Python/Tags.hs index e15bb1b11..ef13706ca 100644 --- a/semantic-tags/src/Language/Python/Tags.hs +++ b/semantic-tags/src/Language/Python/Tags.hs @@ -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