Gabriella439 / Gabriella439/optparse-generic

Combine positional and flag based arguments

Open
#18 6 comments 3 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
215
Forks
36
PR merge metrics
No merged PRs in 30d

Description

I'm trying to combine both positional and flag based arguments, I've tried embedding a record in a normal constructor like so:

```
data Config = Command [String] FlagArguments
data FlagArguments = Args {a :: Bool }
```

While the parser is correct, the help message is fairly useless:

```
Usage: proj-exe build [STRING] FlagArguments
```

What I'd like to get is:

```
Usage: proj-exe build [STRING] --a
```

I don't understand haskell generic programming well enough to provide the correct instances though.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.