Anton Nikishaev <anton....@gmail.com> writes:

> dokondr <doko...@gmail.com> writes:
>
>> Hi, When my program starts it needs to know a complete path to the
>> directory from which it was invoked.  In terms of standard shell (sh)
>> I need the Haskell function that will do equivalent to:
>>
>> #!/bin/sh
>> path=$(dirname $0)
>>
>> How to get this path in Haskell?
>>
>> getProgName :: IO String 
>> defined System.Environment only returns a file name of the program
>> without its full path.
>>
>> Thanks!
>
> http://hackage.haskell.org/package/system-argv0-0.1

(which is argv[0], and surely it's not always the “complete path to the
directory from which it was invoked”. $0 is not either.)



-- 
lelf                                       xmpp:ni...@jabber.ru


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to