Replies: 1 comment
-
If not superseded this is papered over by the new functions |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The Config type as set up by calling
simpleConfig
orcomplexConfig
and passing toconfigure
is pretty good. It meets most of what we were going for in a declarative, obvious, and simple setup to configure the command-line parsing of a program.Having used this API a bit now, it's starting to bother me that the usage side of this is a bit weak. The combination of pattern matching on the Maybe that comes back from
lookupKeyValue
and then pattern matching on the ParameterValue if the option is there is a bit awkward. It's more awkward for the case of flags (where no value is expected [or perhaps, allowed] and very awkward for arguments, where the value must be present at this point of the program because we require arguments to be identified and found inconfigure
.So, perhaps a better type for or within Config would allow the current
lookupOptionFlag
,lookupOptionValue
andlookupArgument
to be combined or significantly simplified.That would be a major API bump breaking change. Ok.
AfC
Beta Was this translation helpful? Give feedback.
All reactions