getWorkingDirectory/changeWorkingDirectory

Christopher Done chrisdone at gmail.com
Wed Dec 4 14:18:49 UTC 2013


How does it differ to getCurrentDirectory/setCurrentDirectory in
System.Directory?


On 4 December 2013 14:38, Benjamin Franksen <
benjamin.franksen at 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
>
>   getWorkingDirectory :: IO FilePath
>   setWorkingDirectory :: FilePath -> IO ()
>
> I propose to add these functions to System.Environmant or maybe
> System.Directory.
>
> Rationale:
>
> (1) This is standard functionality that should at least be in the Haskell
> Platform, if not in the standard libraries.
>
> (2) I would like to avoid depending on an extra package just to have these
> two very basic functions available in a OS independent way.
>
> (3) "system-fileio".Filesystem does not seem to be the right place for
> this.
>
> The last point may be arguable, but the first two are plain common sense
> IMO.
>
> Cheers
> Ben
> --
> "Make it so they have to reboot after every typo." ? Scott Adams
>
>
> _______________________________________________
> Haskell-prime mailing list
> Haskell-prime at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-prime
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-prime/attachments/20131204/41c3b09a/attachment.html>


More information about the Haskell-prime mailing list