How to get the "remaining arguments" in optparse-applyative?

I am trying to use optparse-applyative. How can I access arguments that are not parameters? (From prog --foo --bar=42 baz, I want to get ["baz"])

All high-level features https://hackage.haskell.org/package/optparse-applicative-0.11.0.2/docs/Options-Applicative-Extra.html return awhere I want (a,[String]).

There is some low-level function https://hackage.haskell.org/package/optparse-applicative-0.11.0.2/docs/Options-Applicative-Common.html#v:runParser , but I can not name it directly because of its type . And really, I want to reuse all the plumbing, which is located at https://hackage.haskell.org/package/optparse-applicative-0.11.0.2/docs/src/Options-Applicative-Extra.html#execParser .

+4
source share
1 answer

. , . argument strArgument .

+3

All Articles