scala-optparse-applicative
scala-optparse-applicative copied to clipboard
Add example on how to use `helper` when validating arguments
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.