mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Stub in a custom ToTagBy instance for class definitions.
This commit is contained in:
parent
c4daf7bcea
commit
683ab79c06
@ -58,6 +58,7 @@ type family ToTagInstance t :: Strategy where
|
||||
ToTagInstance [_] = 'Custom
|
||||
ToTagInstance ((_ :+: _) _) = 'Custom
|
||||
ToTagInstance (Py.FunctionDefinition Loc) = 'Custom
|
||||
ToTagInstance (Py.ClassDefinition Loc) = 'Custom
|
||||
ToTagInstance _ = 'Generic
|
||||
|
||||
instance ToTagBy 'Custom Loc where
|
||||
@ -89,6 +90,9 @@ instance ToTagBy 'Custom (Py.FunctionDefinition Loc) where
|
||||
tag returnType
|
||||
traverse_ tag extraChildren
|
||||
|
||||
instance ToTagBy 'Custom (Py.ClassDefinition Loc) where
|
||||
tag' Py.ClassDefinition {} = pure ()
|
||||
|
||||
yield :: (Carrier sig m, Member (Writer (Endo [Tag])) sig) => Tag -> m ()
|
||||
yield = tell . Endo . (:)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user