
1 Dec
2011
1 Dec
'11
12:53 p.m.
On Thu, Dec 1, 2011 at 3:41 PM, Simon Hengel
How to get this path in Haskell?
If I understand you correctly, you want
takeDirectory `fmap` getProgName
I think getProgName does not give you the full path, but only the program name.
Neither does $0, does it? It depends on how the program is called. You can always use System.Directory.getCurrentDirectory with System.FilePath.{isRelative,replaceDirectory} if you somehow need the full path. Note, however, that not even this is generally guaranteed to be correct. Cheers, -- Felipe.