diff --git a/prototype/doubt-difftool/Argument.swift b/prototype/doubt-difftool/Argument.swift index ca07554a5..8c1724e30 100644 --- a/prototype/doubt-difftool/Argument.swift +++ b/prototype/doubt-difftool/Argument.swift @@ -29,9 +29,12 @@ enum Argument { } } -private let validFlags: Set = [ "--unified", "--split" ] +private let flag: Madness.Parser<[String], Argument.Output>.Function = + const(Argument.Output.Unified) <^> satisfy { $0 == "--unified" } + <|> const(Argument.Output.Split) <^> satisfy { $0 == "--split" } let argumentsParser: Madness.Parser<[String], Argument>.Function = none() import Madness +import Prelude