From 3d617fd98b981929886498bf881c93e650096248 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Jul 2014 12:33:11 -0400 Subject: propellor spin --- src/Propellor/Info.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Info.hs') diff --git a/src/Propellor/Info.hs b/src/Propellor/Info.hs index 080a971e..1b89c008 100644 --- a/src/Propellor/Info.hs +++ b/src/Propellor/Info.hs @@ -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)) -- cgit v1.2.3