1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 11:02:26 +03:00

Define a default TaggableBy instance.

This commit is contained in:
Rob Rix 2019-09-18 12:44:02 -04:00
parent 8756897833
commit 5b261b5ffd
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -140,6 +140,11 @@ subtractLocation a b = subtractRange (locationByteRange a) (locationByteRange b)
type family TaggableInstance (t :: * -> *) :: Strategy where
TaggableInstance _ = 'Default
instance TaggableBy 'Default t where
docsLiteral' _ _ = Nothing
snippet' _ _ = Nothing
symbolName' _ = Nothing
instance Apply Taggable fs => Taggable (Sum fs) where
docsLiteral a = apply @Taggable (docsLiteral a)
snippet x = apply @Taggable (snippet x)