1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

Reuse toMap.

This commit is contained in:
Rob Rix 2019-10-16 23:13:41 -04:00
parent 39a643c149
commit 5e3fd0e6d1
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -27,7 +27,7 @@ legacyDiffSummary = distributeFoldMap go
where
go blobPair = decoratingDiffWith summarizeDiffParsers decorateTerm (pure . uncurry (flip Summaries) . bimap toMap toMap . partitionEithers . summarizeDiff) blobPair
`catchError` \(SomeException e) ->
pure $ Summaries mempty (Map.singleton path [toJSON (ErrorSummary (T.pack (show e)) lowerBound lang)])
pure $ Summaries mempty (toMap [ErrorSummary (T.pack (show e)) lowerBound lang])
where path = T.pack $ pathKeyForBlobPair blobPair
lang = languageForBlobPair blobPair