On Wed, Dec 4, 2013 at 8:38 AM, Benjamin Franksen <benjamin.franksen@helmholtz-berlin.de> wrote:
Module System.Posix.Directory of the unix package defines

  getWorkingDirectory :: IO FilePath
  changeWorkingDirectory :: FilePath -> IO ()

I believe the functionality is quite portable and not limited to unix-like
systems. I know that e.g. Windows has chdir and getcwd. Module Filesystem of
the system-fileio package has

The functionality is similar but different, insofar as Windows still has legacy drive paths and the current directory is maintained separately for each one; I would expect this to be exposed in a Windows version.

That said, there are already setCurrentDirectory and getCurrentDirectory in System.Directory for portable versions.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net