I got an argument parser working using getOpt which is great, but I do have one question. When using ReqArg in an option like:
Option ['c'] ["config"] (ReqArg (\f opts -> opts { configFile = f }) "FILE")
"use a custom configuration file"
what does it use that second argument for (in this case, "FILE")? I have not experienced any kind of difference in behavior when specifying another string.
It’s for the auto-generated usage message. Same with OptArg. Run
usageInfoon your OptDescr list and see what comes back.