summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Postfix.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Propellor/Property/Postfix.hs b/src/Propellor/Property/Postfix.hs
index 027ea4cf..1cfc64d3 100644
--- a/src/Propellor/Property/Postfix.hs
+++ b/src/Propellor/Property/Postfix.hs
@@ -49,12 +49,13 @@ mappedFile f setup = setup f
-- Note that multiline configurations that continue onto the next line
-- are not currently supported.
dedupMainCf :: Property
-dedupMainCf = fileProperty "postfix main.cf dedupped" go mainCf
- where
- go ls =
- let parsed = map parse ls
- in dedup [] (keycounts $ rights parsed) parsed
-
+dedupMainCf = fileProperty "postfix main.cf dedupped" dedupCf mainCf
+
+dedupCf :: [String] -> [String]
+dedupCf ls =
+ let parsed = map parse ls
+ in dedup [] (keycounts $ rights parsed) parsed
+ where
parse l
| "#" `isPrefixOf` l = Left l
| "=" `isInfixOf` l =