propellor spin

This commit is contained in:
Joey Hess 2014-07-23 12:33:11 -04:00
parent 41a23743e7
commit 3d617fd98b
Failed to extract signature
1 changed files with 2 additions and 2 deletions

View File

@ -76,8 +76,8 @@ hostMap :: [Host] -> M.Map HostName Host
hostMap l = M.fromList $ zip (map hostName l) l
aliasMap :: [Host] -> M.Map HostName Host
aliasMap l = M.fromList $ concat $ map (flip zip l) $
map (S.toList . _aliases . hostInfo) l
aliasMap = M.fromList . concat .
map (\h -> map (\aka -> (aka, h)) $ S.toList $ _aliases $ hostInfo h)
findHost :: [Host] -> HostName -> Maybe Host
findHost l hn = maybe (findAlias l hn) Just (M.lookup hn (hostMap l))