mirror of
https://github.com/github/semantic.git
synced 2024-12-11 08:45:48 +03:00
Reformat go.
This commit is contained in:
parent
582d516bf4
commit
bfec2ffa45
@ -103,12 +103,13 @@ dedupe = map snd . sortOn fst . Map.elems . snd . foldl' go (0, Map.empty)
|
|||||||
go :: (Int, Map.Map DedupeKey (Int, (Entry, Declaration)))
|
go :: (Int, Map.Map DedupeKey (Int, (Entry, Declaration)))
|
||||||
-> (Entry, Declaration)
|
-> (Entry, Declaration)
|
||||||
-> (Int, Map.Map DedupeKey (Int, (Entry, Declaration)))
|
-> (Int, Map.Map DedupeKey (Int, (Entry, Declaration)))
|
||||||
go (index, m) x | Just (_, (_, similarDecl)) <- Map.lookup (dedupeKey (snd x)) m
|
go (index, m) x
|
||||||
= if similarDecl == snd x
|
| Just (_, (_, similarDecl)) <- Map.lookup (dedupeKey (snd x)) m
|
||||||
then (succ index, m)
|
= if similarDecl == snd x then
|
||||||
else
|
(succ index, m)
|
||||||
(succ index, Map.insert (dedupeKey similarDecl) (index, (Replaced, similarDecl)) m)
|
else
|
||||||
| otherwise = (succ index, Map.insert (dedupeKey (snd x)) (index, x) m)
|
(succ index, Map.insert (dedupeKey similarDecl) (index, (Replaced, similarDecl)) m)
|
||||||
|
| otherwise = (succ index, Map.insert (dedupeKey (snd x)) (index, x) m)
|
||||||
|
|
||||||
dedupeKey decl = DedupeKey (toCategoryName decl, T.toLower (declarationIdentifier decl))
|
dedupeKey decl = DedupeKey (toCategoryName decl, T.toLower (declarationIdentifier decl))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user