mirror of
https://github.com/github/semantic.git
synced 2024-12-29 18:06:14 +03:00
🔥 dedupe’s dependence on Category.
This commit is contained in:
parent
7a753baf78
commit
bda8746224
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user