On Thu, Dec 1, 2011 at 2:12 PM, dokondr <doko...@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. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe