1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 04:51:57 +03:00

Move the default definitions into TaggableBy.

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

View File

@ -96,10 +96,13 @@ class TaggableBy (strategy :: Strategy) constr where
, HasTextElement syntax
)
=> Language -> constr (Term syntax Location) -> Maybe Range
docsLiteral' _ _ = Nothing
snippet' :: (Foldable syntax) => Location -> constr (Term syntax Location) -> Maybe Range
snippet' _ _ = Nothing
symbolName' :: Declarations1 syntax => constr (Term syntax Location) -> Maybe Name
symbolName' _ = Nothing
type IsTaggable syntax =
( Functor syntax
@ -140,10 +143,7 @@ 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 TaggableBy 'Default t
instance Apply Taggable fs => Taggable (Sum fs) where
docsLiteral a = apply @Taggable (docsLiteral a)