mirror of
https://github.com/github/semantic.git
synced 2024-12-27 00:44:57 +03:00
Rename ToTagInstance to ToTagsInstance.
This commit is contained in:
parent
f791316003
commit
60c3e359de
@ -33,7 +33,7 @@ instance Tags.ToTags Term where
|
||||
tags = tags . getTerm
|
||||
|
||||
|
||||
instance (ToTagsBy strategy t, strategy ~ ToTagInstance t) => ToTags t where
|
||||
instance (ToTagsBy strategy t, strategy ~ ToTagsInstance t) => ToTags t where
|
||||
tags = tags' @strategy
|
||||
|
||||
|
||||
@ -49,12 +49,12 @@ class ToTagsBy (strategy :: Strategy) t where
|
||||
|
||||
data Strategy = Generic | Custom
|
||||
|
||||
type family ToTagInstance t :: Strategy where
|
||||
ToTagInstance (_ :+: _) = 'Custom
|
||||
ToTagInstance Py.FunctionDefinition = 'Custom
|
||||
ToTagInstance Py.ClassDefinition = 'Custom
|
||||
ToTagInstance Py.Call = 'Custom
|
||||
ToTagInstance _ = 'Generic
|
||||
type family ToTagsInstance t :: Strategy where
|
||||
ToTagsInstance (_ :+: _) = 'Custom
|
||||
ToTagsInstance Py.FunctionDefinition = 'Custom
|
||||
ToTagsInstance Py.ClassDefinition = 'Custom
|
||||
ToTagsInstance Py.Call = 'Custom
|
||||
ToTagsInstance _ = 'Generic
|
||||
|
||||
instance (ToTags l, ToTags r) => ToTagsBy 'Custom (l :+: r) where
|
||||
tags' (L1 l) = tags l
|
||||
|
Loading…
Reference in New Issue
Block a user