[Haskell-cafe] How to get a file path to the program invoked?

Daniel Fischer daniel.is.fischer at googlemail.com
Mon Dec 5 16:08:17 CET 2011


On Monday 05 December 2011, 15:53:35, dokondr wrote:
> Balazs, thanks for your comments!
> The first comment works just fine.
> With </> operator I get this:
> 
> Main System.Environment.Executable System.FilePath> "/abc" </> "/"
> "/"
> 
> Instead of getting "/abc/" I get "/". What am I doing wrong?

The second path is absolute.

</> is an alias for combine, the docs for that say:

"Combine two paths, if the second path isAbsolute, then it returns the 
second."



More information about the Haskell-Cafe mailing list