From 5e3fd0e6d13b19e9a6a090239b634cd4b1b98079 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 16 Oct 2019 23:13:41 -0400 Subject: [PATCH] Reuse toMap. --- src/Semantic/Api/TOCSummaries.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Semantic/Api/TOCSummaries.hs b/src/Semantic/Api/TOCSummaries.hs index 04d487c41..c15c63fe4 100644 --- a/src/Semantic/Api/TOCSummaries.hs +++ b/src/Semantic/Api/TOCSummaries.hs @@ -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