diff options
| author | Mario Lang <mlang@delysid.org> | 2015-09-13 00:46:49 +0200 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-09-13 13:21:41 -0400 |
| commit | b84c9bbb7c9db688118ad756c1c43ef034fd98fb (patch) | |
| tree | 61d50f50f58714e9df2390c337fa7bb2ff34d3ea /src/Propellor/PrivData.hs | |
| parent | 2af70d4ac7ff25a3e596de195abe40db46c74074 (diff) | |
Follow some hlint suggestions.
Diffstat (limited to 'src/Propellor/PrivData.hs')
| -rw-r--r-- | src/Propellor/PrivData.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
