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

Stub in a custom ToTagBy instance for calls.

This commit is contained in:
Rob Rix 2019-09-23 17:36:55 -04:00
parent 683ab79c06
commit 4993275b5c
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -59,6 +59,7 @@ type family ToTagInstance t :: Strategy where
ToTagInstance ((_ :+: _) _) = 'Custom
ToTagInstance (Py.FunctionDefinition Loc) = 'Custom
ToTagInstance (Py.ClassDefinition Loc) = 'Custom
ToTagInstance (Py.Call Loc) = 'Custom
ToTagInstance _ = 'Generic
instance ToTagBy 'Custom Loc where
@ -93,6 +94,9 @@ instance ToTagBy 'Custom (Py.FunctionDefinition Loc) where
instance ToTagBy 'Custom (Py.ClassDefinition Loc) where
tag' Py.ClassDefinition {} = pure ()
instance ToTagBy 'Custom (Py.Call Loc) where
tag' Py.Call {} = pure ()
yield :: (Carrier sig m, Member (Writer (Endo [Tag])) sig) => Tag -> m ()
yield = tell . Endo . (:)