Open chshersh opened 2 years ago
optparse-applicative provides a switch parser with the following type:
optparse-applicative
switch
switch :: Mod FlagFields Bool -> Parser Bool
It's not entirely clear what does the Bool mean: Is it True when the argument is enabled or when it's default?
Bool
True
I propose to introduce a helper parser in the Iris.Cli.OnOff module:
Iris.Cli.OnOff
data OnOff = Off | On onoff :: Mod FlagFields Bool -> Parser OnOff
optparse-applicative
provides aswitch
parser with the following type:It's not entirely clear what does the
Bool
mean: Is itTrue
when the argument is enabled or when it's default?I propose to introduce a helper parser in the
Iris.Cli.OnOff
module: