Addition to unix: raw ByteString APIs

Bas van Dijk v.dijk.bas at
Fri Nov 11 18:37:46 CET 2011

On 11 November 2011 18:16, Evan Laforge <qdunkan at> wrote:
>>      - There is a new function
>>         System.Posix.ByteString.getArgs :: [ByteString]
>>        returning the raw untranslated arguments as passed to exec()
>>        when the program was started.
> Is this one similar to the [String] getArgs in that it drops unix's
> argv[0]?  I was recently surprised by that in the standard getArgs
> because I wanted a program to restart itself.  I can't figure out how
> to do that without access to argv[0].
> I suppose for consistency the ByteString version should have the same
> behaviour, so maybe this is just an opportunity to wonder why it does
> that in the first place.
> _______________________________________________
> Libraries mailing list
> Libraries at

System.Environment exports:

getProgName :: IO String

maybe System.Posix.ByteString should export a similar function:

getProgName :: IO ByteString


More information about the Libraries mailing list