1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 18:23:44 +03:00
This commit is contained in:
Rob Rix 2019-09-24 17:03:23 -04:00
parent e5ecd7c849
commit 6baa33d0d6
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -56,6 +56,7 @@ type family ToTagsInstance t :: Strategy where
ToTagsInstance Py.Call = 'Custom
ToTagsInstance _ = 'Generic
instance (ToTags l, ToTags r) => ToTagsBy 'Custom (l :+: r) where
tags' (L1 l) = tags l
tags' (R1 r) = tags r
@ -109,5 +110,6 @@ docComment _ _ = Nothing
firstLine :: Source -> Text
firstLine = T.take 180 . T.takeWhile (/= '\n') . toText
instance (Generic1 t, Tags.GFoldable1 ToTags (Rep1 t)) => ToTagsBy 'Generic t where
tags' = getAp . Tags.gfoldMap1 @ToTags (Ap . tags) . from1