On Fri, Nov 11, 2011 at 7:59 PM, Evan Laforge
<qdunkan@gmail.com> wrote:
> System.Environment exports:
>
> getProgName :: IO String
>
> maybe System.Posix.ByteString should export a similar function:
>
> getProgName :: IO ByteString
Yeah, that's actually not the same as argv[0], it has the path to the
binary stripped. So you can't really use it to restart yourself
because you have no way to know what directory the binary was in.
It's frustrating because you can see in the source that it's going to
some effort to intentionally strip off information that you can't get
elsewhere.