From bda8746224ef898297d3e3947a979ced035c03ed Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 5 Jun 2017 17:02:50 -0400 Subject: [PATCH] =?UTF-8?q?:fire:=20dedupe=E2=80=99s=20dependence=20on=20C?= =?UTF-8?q?ategory.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Renderer/TOC.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Renderer/TOC.hs b/src/Renderer/TOC.hs index 52f4d95d0..a41468dfe 100644 --- a/src/Renderer/TOC.hs +++ b/src/Renderer/TOC.hs @@ -136,7 +136,7 @@ tableOfContentsBy selector = fromMaybe [] . iter diffAlgebra . fmap (Just . fmap | otherwise = fold r patchEntry = these Deleted Inserted (const Replaced) . unPatch -dedupe :: (HasField fields Category, HasField fields (Maybe Declaration)) => [Entry (Record fields)] -> [Entry (Record fields)] +dedupe :: HasField fields (Maybe Declaration) => [Entry (Record fields)] -> [Entry (Record fields)] dedupe = foldl' go [] where go xs x | (_, _:_) <- find (exactMatch `on` entryPayload) x xs = xs | (front, similar : back) <- find (similarMatch `on` entryPayload) x xs =