Skip to content

Combine positional and flag based arguments #18

@xldenis

Description

@xldenis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions