summaryrefslogtreecommitdiff
path: root/src/Propellor/Info.hs
diff options
context:
space:
mode:
authorJoey Hess2014-07-23 12:33:11 -0400
committerJoey Hess2014-07-23 12:33:11 -0400
commit3d617fd98b981929886498bf881c93e650096248 (patch)
treed02e2f5adc5bb41cc36fb424e10ac4477417a629 /src/Propellor/Info.hs
parent41a23743e7f5b90c12a2b2ef19ccb3dcbb7bfef9 (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Info.hs')
-rw-r--r--src/Propellor/Info.hs4
1 files changed, 2 insertions, 2 deletions
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))