Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement switch parsers #20

Open
chshersh opened this issue May 22, 2022 · 0 comments
Open

Implement switch parsers #20

chshersh opened this issue May 22, 2022 · 0 comments
Labels
cli-options CLI options, parsers good first issue Good for newcomers

Comments

@chshersh
Copy link
Owner

chshersh commented May 22, 2022

optparse-applicative provides a switch parser with the following type:

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?

I propose to introduce a helper parser in the Iris.Cli.OnOff module:

data OnOff
    = Off
    | On

onoff :: Mod FlagFields Bool -> Parser OnOff
@chshersh chshersh added the cli-options CLI options, parsers label May 22, 2022
@chshersh chshersh added the good first issue Good for newcomers label Aug 8, 2022
alleksandrgall added a commit to alleksandrgall/iris that referenced this issue Aug 18, 2022
@chshersh chshersh added the hacktoberfest https://hacktoberfest.com/ label Sep 27, 2022
@chshersh chshersh removed the hacktoberfest https://hacktoberfest.com/ label Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli-options CLI options, parsers good first issue Good for newcomers
Projects
No open projects
Status: Todo
Development

No branches or pull requests

1 participant