diff --git a/semantic-tags/src/Language/Python/Tags.hs b/semantic-tags/src/Language/Python/Tags.hs index abbf521f1..2d40d81f3 100644 --- a/semantic-tags/src/Language/Python/Tags.hs +++ b/semantic-tags/src/Language/Python/Tags.hs @@ -17,7 +17,7 @@ import Tags.Tag import qualified Tags.Taggable.Precise as Tags import qualified TreeSitter.Python.AST as Py -class ToTag t where +class ToTags t where tags :: ( Carrier sig m , Member (Reader Source) sig @@ -28,11 +28,11 @@ class ToTag t where newtype Term a = Term { getTerm :: Py.Module a } -instance Tags.ToTag Term where +instance Tags.ToTags Term where tags = tags . getTerm -instance (ToTagBy strategy t, strategy ~ ToTagInstance t) => ToTag t where +instance (ToTagBy strategy t, strategy ~ ToTagInstance t) => ToTags t where tags = tags' @strategy @@ -55,7 +55,7 @@ type family ToTagInstance t :: Strategy where ToTagInstance Py.Call = 'Custom ToTagInstance _ = 'Generic -instance (ToTag l, ToTag r) => ToTagBy 'Custom (l :+: r) where +instance (ToTags l, ToTags r) => ToTagBy 'Custom (l :+: r) where tags' (L1 l) = tags l tags' (R1 r) = tags r @@ -137,7 +137,7 @@ instance GToTag (K1 R t) where instance GToTag Par1 where gtags _ = pure () -instance ToTag t => GToTag (Rec1 t) where +instance ToTags t => GToTag (Rec1 t) where gtags = tags . unRec1 instance (Foldable f, GToTag g) => GToTag (f :.: g) where diff --git a/semantic-tags/src/Tags/Taggable/Precise.hs b/semantic-tags/src/Tags/Taggable/Precise.hs index 645af6d76..cc985722e 100644 --- a/semantic-tags/src/Tags/Taggable/Precise.hs +++ b/semantic-tags/src/Tags/Taggable/Precise.hs @@ -2,7 +2,7 @@ module Tags.Taggable.Precise ( runTagging , Tags -, ToTag(..) +, ToTags(..) , yield ) where @@ -13,7 +13,7 @@ import Source.Loc import Source.Source import Tags.Tag -runTagging :: ToTag t => Source -> t Loc -> [Tag] +runTagging :: ToTags t => Source -> t Loc -> [Tag] runTagging source = ($ []) . appEndo @@ -24,7 +24,7 @@ runTagging source type Tags = Endo [Tag] -class ToTag t where +class ToTags t where tags :: ( Carrier sig m , Member (Reader Source) sig