Command line args cause my fledgling wxHaskell program to crash, and I notice this was raised in a mailing list discussion [1], but I didn't spot a corresponding ticket here.
Essentially you get an error where a program named after the first character of your program name is passed an unexpected parameter that is the first character of your argument. Additional args made no noticeable difference, nor does how your Haskell treats any args.
I'm using lts-3.17 + extra-deps: [wx-0.92.1.0, wxcore-0.92.1.0, wxc-0.92.1.0, wxdirect-0.92.1.0, split-0.2.2] on stack.
An example run:
[Si@thor Mintegrator]$ ./Mintegrator.exe ?eh? fileName: ?eh? Unexpected parameter '?' Usage: M [-h] [--verbose] -h, --help show this help message --verbose generate verbose log messages
The hacky naming workaround is fun but not that practical (see screenshot).
That's weird, I just noticed that I also get a
{first char of program name}-{username}
file dumped into my home directory when the program is run sucessfully (without arguments).So for Mintegrator, I get
M-Si
in my home dir, and it has the contents29665
, which appears to be a pid.Last edit: Si⠀ 2015-12-12
I am not sure if this bug is the same as the one from the mailinglist, but there is a bug ticket at the wxWidgets site related to this: http://trac.wxwidgets.org/ticket/16935
I've opened a pull request for addressing this: https://github.com/wxHaskell/wxHaskell/pull/24
Pull request 24 is pulled. The ticket can be closed.