2 Dec
2011
2 Dec
'11
1:13 a.m.
On Thu, Dec 1, 2011 at 2:12 PM, dokondr <dokondr@gmail.com> wrote:
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.