diff --git a/semantic-tags/src/Language/Python/Tags.hs b/semantic-tags/src/Language/Python/Tags.hs index 8ff26e2e2..e10fc2e00 100644 --- a/semantic-tags/src/Language/Python/Tags.hs +++ b/semantic-tags/src/Language/Python/Tags.hs @@ -109,5 +109,5 @@ docComment _ _ = Nothing firstLine :: Source -> Text firstLine = T.take 180 . T.takeWhile (/= '\n') . toText -instance (Generic1 t, Tags.GFold1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where +instance (Generic1 t, Tags.GFoldable1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where tags' = getAp . Tags.gfoldMap1 @ToTags (Ap . tags) . from1 diff --git a/semantic-tags/src/Tags/Taggable/Precise.hs b/semantic-tags/src/Tags/Taggable/Precise.hs index 44a4ca5ca..9c12daaff 100644 --- a/semantic-tags/src/Tags/Taggable/Precise.hs +++ b/semantic-tags/src/Tags/Taggable/Precise.hs @@ -4,7 +4,7 @@ module Tags.Taggable.Precise , Tags , ToTags(..) , yield -, GFold1(..) +, GFoldable1(..) ) where import Control.Effect.Reader @@ -40,34 +40,34 @@ yield :: (Carrier sig m, Member (Writer Tags) sig) => Tag -> m () yield = tell . Endo . (:) -class GFold1 c t where +class GFoldable1 c t where gfoldMap1 :: Monoid b => (forall f . c f => f a -> b) -> t a -> b -instance GFold1 c f => GFold1 c (M1 i c' f) where +instance GFoldable1 c f => GFoldable1 c (M1 i c' f) where gfoldMap1 alg = gfoldMap1 @c alg . unM1 -instance (GFold1 c f, GFold1 c g) => GFold1 c (f :*: g) where +instance (GFoldable1 c f, GFoldable1 c g) => GFoldable1 c (f :*: g) where gfoldMap1 alg (f :*: g) = gfoldMap1 @c alg f <> gfoldMap1 @c alg g -instance (GFold1 c f, GFold1 c g) => GFold1 c (f :+: g) where +instance (GFoldable1 c f, GFoldable1 c g) => GFoldable1 c (f :+: g) where gfoldMap1 alg (L1 l) = gfoldMap1 @c alg l gfoldMap1 alg (R1 r) = gfoldMap1 @c alg r -instance GFold1 c (K1 R t) where +instance GFoldable1 c (K1 R t) where gfoldMap1 _ _ = mempty -instance GFold1 c Par1 where +instance GFoldable1 c Par1 where gfoldMap1 _ _ = mempty -instance c t => GFold1 c (Rec1 t) where +instance c t => GFoldable1 c (Rec1 t) where gfoldMap1 alg (Rec1 t) = alg t -instance (Foldable f, GFold1 c g) => GFold1 c (f :.: g) where +instance (Foldable f, GFoldable1 c g) => GFoldable1 c (f :.: g) where gfoldMap1 alg = foldMap (gfoldMap1 @c alg) . unComp1 -instance GFold1 c U1 where +instance GFoldable1 c U1 where gfoldMap1 _ _ = mempty