On Thu, Dec 1, 2011 at 3:41 PM, Simon Hengel <[email protected]> wrote:
>> > 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.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe