Skip to content

Support for different help messages for same argument in different constructors #60

@GregorySchwartz

Description

@GregorySchwartz

I don't know if it's possible, but something like:

data Example1 =
  Example1
    { foo :: Int    <?> "Documentation for the foo flag in Example1"
    , bar :: Double <?> "Documentation for the bar flag in Example1"
    }
  | Example2
    { foo :: Int    <?> "Documentation for the foo flag in Example2"
    , bar :: Double <?> "Documentation for the bar flag in Example2"
    }

    deriving (Generic, Show)

Probably requiring some type of record fields. This feature would be quite useful in that you could have a program with multiple entry points with the same arguments, such as input but take in different formats.

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