1
1
mirror of https://github.com/github/semantic.git synced 2024-12-11 08:45:48 +03:00

Monomorphize.

This commit is contained in:
Rob Rix 2019-10-16 17:38:41 -04:00
parent b54d109311
commit a2348e3463
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -98,7 +98,7 @@ newtype DedupeKey = DedupeKey (T.Text, T.Text) deriving (Eq, Ord)
-- identifiers) are in the list.
-- Action: Combine them into a single Replaced entry.
dedupe :: [(Entry, Declaration)] -> [(Entry, Declaration)]
dedupe = (fmap . fmap) snd tuples
dedupe = fmap (map snd) tuples
where
tuples = sortOn fst . Map.elems . snd . foldl' go (0, Map.empty)
go :: (Int, Map.Map DedupeKey (Int, (Entry, Declaration)))