mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Simplify toJSONSummaries.
This commit is contained in:
parent
28d858ce32
commit
c369867230
@ -129,9 +129,7 @@ diffTOC blobs diff = removeDupes (diffToTOCSummaries (source <$> blobs) diff) >>
|
|||||||
isSummarizable _ = False
|
isSummarizable _ = False
|
||||||
|
|
||||||
toJSONSummaries :: TOCSummary DiffInfo -> [JSONSummary]
|
toJSONSummaries :: TOCSummary DiffInfo -> [JSONSummary]
|
||||||
toJSONSummaries TOCSummary{..} = toJSONSummaries' (afterOrBefore summaryPatch)
|
toJSONSummaries TOCSummary{..} = case afterOrBefore summaryPatch of
|
||||||
where
|
|
||||||
toJSONSummaries' diffInfo = case diffInfo of
|
|
||||||
ErrorInfo{..} -> [ErrorSummary termName infoSpan]
|
ErrorInfo{..} -> [ErrorSummary termName infoSpan]
|
||||||
LeafInfo{..} -> maybe [] (pure . JSONSummary) parentInfo
|
LeafInfo{..} -> maybe [] (pure . JSONSummary) parentInfo
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user