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

🔥 Show1 as a superclass of Taggable.

This commit is contained in:
Rob Rix 2019-09-18 12:37:46 -04:00
parent eb2c17be38
commit 222aff395e
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
2 changed files with 3 additions and 3 deletions

View File

@ -108,6 +108,7 @@ type TermConstraints =
, Declarations1
, ConstructorName
, HasTextElement
, Show1
, ToJSONFields1
, Traversable
]

View File

@ -74,7 +74,7 @@ exit c = yield . Exit (pack c)
emitIden :: Monad m => Span -> Maybe Range -> Name -> Tagger m ()
emitIden span docsLiteralRange name = yield (Iden (formatName name) span docsLiteralRange)
class Show1 constr => Taggable constr where
class Taggable constr where
docsLiteral ::
( Foldable syntax
, HasTextElement syntax
@ -92,7 +92,6 @@ type IsTaggable syntax =
( Functor syntax
, Foldable syntax
, Traversable syntax
, Show1 syntax
, Taggable syntax
, ConstructorName syntax
, Declarations1 syntax
@ -130,7 +129,7 @@ subtractLocation a b = subtractRange (locationByteRange a) (locationByteRange b)
-- Instances
instance ( Apply Show1 fs, Apply Taggable fs) => Taggable (Sum fs) where
instance Apply Taggable fs => Taggable (Sum fs) where
docsLiteral a = apply @Taggable (docsLiteral a)
snippet x = apply @Taggable (snippet x)
symbolName = apply @Taggable symbolName