Commit 90dc9f9d authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Make 'allFlags' return 'NoFlag' by default.

Otherwise this field is by default printed as 'all: False' instead of '-- all:'
in the config file. Ideally, we'd like to print the commented default value.
parent 3a2dd4de
......@@ -171,7 +171,9 @@ flagToList (Flag x) = [x]
flagToList NoFlag = []
allFlags :: [Flag Bool] -> Flag Bool
allFlags flags = toFlag $ all (\f -> fromFlagOrDefault False f) flags
allFlags flags = if all (\f -> fromFlagOrDefault False f) flags
then Flag True
else NoFlag
-- ------------------------------------------------------------
-- * Global flags
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment