On Thu, Dec 1, 2011 at 3:41 PM, Simon Hengel <simon.hen...@wiktory.org> 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 Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe