Re: getting the path to the executing program

2004-01-10 Thread Malcolm Wallace
Hal Daume III <[EMAIL PROTECTED]> writes: > > If I may suggest, a Haskell implementation may want to give a > > programmer a way to obtain the unmangled argv0. > > If I may second that, ... You mean like nhc98 and hbc have always done...? Regards, Malcolm ___

Re: getting the path to the executing program

2004-01-09 Thread Glynn Clements
[EMAIL PROTECTED] wrote: > > is there a function, related to getProgName, which returns the (absolute) > > path to the current program? > > > basically, i want to be able to read a file which i know will be in the > > same directory as the current program, but not necessarily in the same > > dir

Re: getting the path to the executing program

2004-01-09 Thread Hal Daume III
Hi, > If I may suggest, a Haskell implementation may want to give a > programmer a way to obtain the unmangled argv0. If I may second that, ... -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume ___

Re: getting the path to the executing program

2004-01-09 Thread oleg
Hal Daume wrote: > is there a function, related to getProgName, which returns the (absolute) > path to the current program? > basically, i want to be able to read a file which i know will be in the > same directory as the current program, but not necessarily in the same > directory that we're run

Re: getting the path to the executing program

2004-01-08 Thread Ferenc Wagner
Hal Daume III <[EMAIL PROTECTED]> writes: > True. Replace "the" with "a" and "?" with ", if it exists?". > > On Thu, 8 Jan 2004, Lennart Augustsson wrote: > >> Hal Daume III wrote: >> >>> is there a function, related to getProgName, which >>> returns the (absolute) path to the current program? >>

Re: getting the path to the executing program

2004-01-08 Thread Hal Daume III
True. Replace "the" with "a" and "?" with ", if it exists?". On Thu, 8 Jan 2004, Lennart Augustsson wrote: > Hal Daume III wrote: > > is there a function, related to getProgName, which returns the (absolute) > > path to the current program? > Well, the absolute path name is not necessarily uniq

Re: getting the path to the executing program

2004-01-08 Thread Lennart Augustsson
Hal Daume III wrote: is there a function, related to getProgName, which returns the (absolute) path to the current program? Well, the absolute path name is not necessarily unique, nor is it guaranteed to exist. :) -- Lennart ___ Haskell mailing list [E

Re: getting the path to the executing program

2004-01-08 Thread Tomasz Zielonka
On Thu, Jan 08, 2004 at 07:02:04PM +0100, Tomasz Zielonka wrote: > On Thu, Jan 08, 2004 at 09:06:44AM -0800, Hal Daume III wrote: > > is there a function, related to getProgName, which returns the (absolute) > > path to the current program? > > A non-portable Linux solution: > > System.Posix

Re: getting the path to the executing program

2004-01-08 Thread Per Larsson
On Thursday 08 January 2004 18.06, Hal Daume III wrote: > is there a function, related to getProgName, which returns the (absolute) > path to the current program? > > basically, i want to be able to read a file which i know will be in the > same directory as the current program, but not necessarily

Re: getting the path to the executing program

2004-01-08 Thread Tomasz Zielonka
On Thu, Jan 08, 2004 at 09:06:44AM -0800, Hal Daume III wrote: > is there a function, related to getProgName, which returns the (absolute) > path to the current program? A non-portable Linux solution: System.Posix.readSymbolicLink "/proc/self/exe" Best regards, Tom -- .signature: Too many

Re: getting the path to the executing program

2004-01-08 Thread Hal Daume III
Sadly, this doesn't seem to work: 9:26am albini:SVMseq/ cat Foo.hs module Main where import System.Environment main = getEnv "_" >>= putStrLn 9:27am albini:SVMseq/ ghc Foo.hs -o foo 9:27am albini:SVMseq/ ./foo Fail: does not exist Action: getEnv Reason: no environment variable File: _ On Thu,

getting the path to the executing program

2004-01-08 Thread Hal Daume III
is there a function, related to getProgName, which returns the (absolute) path to the current program? basically, i want to be able to read a file which i know will be in the same directory as the current program, but not necessarily in the same directory that we're running it from. -- Hal D