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

Normalize names before unioning

This commit is contained in:
joshvera 2016-08-10 10:55:48 -04:00
parent f9bbe63a4f
commit 1574e74bcb

View File

@ -58,7 +58,7 @@ examples directory = do
let lookupName name = (lookupNormalized name as, lookupNormalized name bs, lookupNormalized name jsons, lookupNormalized name patches, lookupNormalized name splits) let lookupName name = (lookupNormalized name as, lookupNormalized name bs, lookupNormalized name jsons, lookupNormalized name patches, lookupNormalized name splits)
let keys = normalizeName <$> union as bs let keys = union (normalizeName <$> as) (normalizeName <$> bs)
pure $ lookupName <$> keys pure $ lookupName <$> keys
where where
lookupNormalized name = find $ (== name) . normalizeName lookupNormalized name = find $ (== name) . normalizeName