From b84c9bbb7c9db688118ad756c1c43ef034fd98fb Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Sun, 13 Sep 2015 00:46:49 +0200 Subject: Follow some hlint suggestions. --- src/Propellor/PrivData.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Propellor/PrivData.hs') diff --git a/src/Propellor/PrivData.hs b/src/Propellor/PrivData.hs index 9aa6f380..cbb296ce 100644 --- a/src/Propellor/PrivData.hs +++ b/src/Propellor/PrivData.hs @@ -187,16 +187,16 @@ listPrivDataFields hosts = do showSet $ map (\(f, c) -> (f, c, join $ M.lookup (f, c) descmap)) missing where header = ["Field", "Context", "Used by"] - mkrow k@(field, (Context context)) = + mkrow k@(field, Context context) = [ shellEscape $ show field , shellEscape context , intercalate ", " $ sort $ fromMaybe [] $ M.lookup k usedby ] mkhostmap host mkv = M.fromList $ map (\(f, d, c) -> ((f, mkHostContext c (hostName host)), mkv d)) $ S.toList $ fromPrivInfo $ getInfo $ hostInfo host - usedby = M.unionsWith (++) $ map (\h -> mkhostmap h $ const $ [hostName h]) hosts + usedby = M.unionsWith (++) $ map (\h -> mkhostmap h $ const [hostName h]) hosts wantedmap = M.fromList $ zip (M.keys usedby) (repeat "") - descmap = M.unions $ map (\h -> mkhostmap h id) hosts + descmap = M.unions $ map (`mkhostmap` id) hosts section desc = putStrLn $ "\n" ++ desc showtable rows = do putStr $ unlines $ formatTable $ tableWithHeader header rows -- cgit v1.3-2-g0d8e