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

Rename ToTag to ToTags.

This commit is contained in:
Rob Rix 2019-09-24 16:16:30 -04:00
parent 6be281d36a
commit 12be927e84
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
2 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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