mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
🔥 an unnecessary Functor constraint.
This commit is contained in:
parent
f0b89c508c
commit
4abace2490
@ -239,7 +239,7 @@ jsonParseTree' constructor combine debug SourceBlob{..} term = toJSON $ construc
|
||||
decorateTerm decorator = cata $ \ term -> cofree ((decorator term :. headF term) :< tailF term)
|
||||
|
||||
-- | Term decorator extracting the source text for a term.
|
||||
termSourceTextDecorator :: (Functor f, HasField fields Range) => Source -> TermDecorator f fields (Maybe SourceText)
|
||||
termSourceTextDecorator :: HasField fields Range => Source -> TermDecorator f fields (Maybe SourceText)
|
||||
termSourceTextDecorator source (ann :< _) = Just (SourceText (toText (Source.slice (byteRange ann) source)))
|
||||
|
||||
-- | A function computing a value to decorate terms with. This can be used to cache synthesized attributes on terms.
|
||||
|
Loading…
Reference in New Issue
Block a user