mirror of
https://github.com/github/semantic.git
synced 2024-12-21 13:51:44 +03:00
Revert "Don’t pattern match against the term functor."
This reverts commit e30138d20144257a49d93b8ec2e2af54f551422a.
This commit is contained in:
parent
55907f4ee0
commit
617cbf681e
@ -82,10 +82,10 @@ diffTOC blobs = removeDupes . diffToTOCSummaries >=> toJSONSummaries
|
||||
(_, _) -> False
|
||||
|
||||
diffToTOCSummaries = para $ \diff -> case diff of
|
||||
Free r
|
||||
| Just identifier <- identifierFor diffSource diffUnwrap (tailF r) ->
|
||||
foldMap (fmap (contextualize (Summarizable (category (Both.snd (headF r))) identifier (sourceSpan (Both.snd (headF r))) "modified")) . snd) r
|
||||
| otherwise -> foldMap snd r
|
||||
Free (Join (_, annotation) :< syntax)
|
||||
| Just identifier <- identifierFor diffSource diffUnwrap syntax ->
|
||||
foldMap (fmap (contextualize (Summarizable (category annotation) identifier (sourceSpan annotation) "modified")) . snd) syntax
|
||||
| otherwise -> foldMap snd syntax
|
||||
Pure patch -> fmap summarize (sequenceA (runBothWith mapPatch (toInfo . source <$> blobs) patch))
|
||||
|
||||
summarize patch = TOCSummary patch (infoCategory >>= summarizable)
|
||||
|
Loading…
Reference in New Issue
Block a user