cmdargs
cmdargs copied to clipboard
Haskell library for command line argument processing
Sometimes it is useful to define one flag as entirely custom, e.g. by fully specifying the `Flag` value. I should support that.
I suspect it is never used by anyone, and it introduces an unfortunate dependency. I should try and eliminate it.
People seem to like writing their parsers in applicative format. I'm not a fan (you don't write the label next to the value, which makes it fragile) but I should...
Eg https://github.com/simonmichael/hledger/issues/149 .
When deriving option _names_ from constructors, underscore is converted to '-' using `asName` [function](https://github.com/ndmitchell/cmdargs/blob/29acda060190f18e739027d841badaaa1329e440/System/Console/CmdArgs/Implicit/Global.hs#L232C1-L232C7). The same logic should apply when deriving _values_ for options of algebraic types. A canonical scenario...
In Liquid Haskell, the help messages for each flag are rather narrow. ``` liquidhaskell [OPTIONS] Refinement Types for Haskell Common flags: --minimal Minimal logging verbosity -q --quiet Silent logging verbosity...