behaviour change in getDirectoryContents in GHC 7.2?

John Millikin jmillikin at
Wed Nov 9 17:42:27 CET 2011

On Wed, Nov 9, 2011 at 08:04, Simon Marlow <marlowsd at> wrote:
> Ok, I spent most of today adding ByteString alternatives for all of the
> functions in System.Posix that use FilePath or environment strings.  The
> Haddocks for my augmented unix package are here:
> In particular, the module System.Posix.ByteString is the whole System.Posix
> API but with ByteString FilePaths and environment strings:

This looks lovely -- thank you.

Once it's released, I'll port all my libraries over to using it.

> It has one addition relative to System.Posix:
>  getArgs :: IO [ByteString]

Thank you very much! Several tools I use daily accept binary data as
command-line options, and this will make it much easier to port them
to Haskell in the future.

> Let me know what you think.  I suspect the main controversial aspect is that
> I included
>  type FilePath = ByteString
> which is a bit cute but might be confusing.

Indeed, I was very confused when I saw that in the docs. If it's not
too much trouble, could those functions accept/return ByteString

More information about the Glasgow-haskell-users mailing list