
1 Dec
2011
1 Dec
'11
12:13 p.m.
On Thu, Dec 1, 2011 at 2:12 PM, dokondr
Hi, When my program starts it needs to know a complete path to the directory from which it was invoked. In terms of standard shell (sh) I need the Haskell function that will do equivalent to:
#!/bin/sh path=$(dirname $0)
How to get this path in Haskell?
If I understand you correctly, you want takeDirectory `fmap` getProgName where import System.FilePath (takeDirectory) Cheers, -- Felipe.