You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If "arguments" isn't the last argument in the applicative declaration it swallows all options (including --hyphenated ones etc). I'm not sure whether this is a bug or a limitation of applicative?
I suppose a work around if you don't want to reorder your data structure is to use some helper function instead of applying your data constructor directly. But if this isn't about a limitation of applicative it would be nice to need no such workarounds! :)
The text was updated successfully, but these errors were encountered:
Use the new arrow interface (in 0.1.1) to move the arguments parser to the
end, regardless of the position of the corresponding field in the parsed
record.
Pass a custom reader to arguments that ignores things that look like
arguments. For example:
str'::String->MaybeString
str' ('-':_) =Nothing
str' x =Just x
This should really be integrated into arguments, however.
It's also common to have -- mark "end of flags", so could be nice if arguments supported that convention as well. That is, -- --hyphenated still parses into ["--hyphenated"].
At the moment, you can emulate it by adding a subparser with a single command "--" returning the same argument parser, but it's a bit of a hack, and you get a weird -- in the help page, which is not ideal.
If "arguments" isn't the last argument in the applicative declaration it swallows all options (including
--hyphenated
ones etc). I'm not sure whether this is a bug or a limitation of applicative?I suppose a work around if you don't want to reorder your data structure is to use some helper function instead of applying your data constructor directly. But if this isn't about a limitation of applicative it would be nice to need no such workarounds! :)
The text was updated successfully, but these errors were encountered: