Skip to content

Add example on how to use helper when validating arguments #11

@dnadales

Description

@dnadales

Consider the following setting:

  type V[A] = ValidationNel[String, A]
  type ParserV[A] = Parser[V[A]]

implicit val ParserVInstance: Applicative[ParserV] =
       Applicative[Parser] compose Applicative[V]

 val optsParser: ParserV[Options] = ???

In this case it is not possible to compose the parsers with helper:

 execParser(args, "xxx", info(optsParser <*> helper))

It'd be nice to have an example on how helper can be used in the setting of parsers with validation.

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