1
1
mirror of https://github.com/github/semantic.git synced 2024-11-27 12:57:49 +03:00

Use GTraversable1 for Java.

This commit is contained in:
Rob Rix 2020-01-13 14:21:51 -05:00
parent 90b99e200b
commit d606702573
No known key found for this signature in database
GPG Key ID: 2BE643E01DC032AE

View File

@ -90,11 +90,11 @@ gtags
:: ( Has (Reader Source) sig m
, Has (Writer Tags.Tags) sig m
, Generic1 t
, Tags.GFoldable1 ToTags (Rep1 t)
, Tags.GTraversable1 ToTags (Rep1 t)
)
=> t Loc
-> m ()
gtags = getAp . Tags.gfoldMap1 @ToTags (Ap . tags) . from1
gtags = getAp . Tags.foldMap1 @ToTags (const mempty) (Ap . tags) . Tags.Generics
instance (Generic1 t, Tags.GFoldable1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where
instance (Generic1 t, Tags.GTraversable1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where
tags' = gtags