I'm using optparse-applicative
version 0.7.0.2.
I want to write a parser that takes some mandatory options, but that when invoked with no options it shows both usage and help, as opposed to just usage (that is, I want the invocation with no options to behave as the invocation with --help
).
I can't figure out how to do so, even if the documentation says it is possible:
The hello option in this example is mandatory (since it doesn't have a default value), so running the program without any argument will display a help text
Is there a working example of this? The one in the main documentation doesn't work for me (it prints usage only.)