behaviour change in getDirectoryContents in GHC 7.2?

Max Bolingbroke batterseapower at
Wed Nov 9 17:04:18 CET 2011

On 9 November 2011 11:02, Simon Marlow <marlowsd at> wrote:
> The performance overhead of all this worries me.  withCString has taken a
> huge performance hit, and I think there are people who wnat to know that
> there aren't several complex encoding/decoding passes between their Haskell
> code and the POSIX API.  We ought to be able to program to POSIX directly,
> and the same goes for Win32.

We are only really talking about environment variables, filenames and
command line arguments here. I'm sure there are performance
implications to all this decoding/encoding, but these bits of text are
almost always very short and are unlikely to be causing bottlenecks.
Adding a whole new API *just* to eliminate a hypothetical performance
problem seems like overkill.

OTOH, I'm happy to add it if we stick with using private chars for the
escapes, because then using it or not using it is a *correctness*
issue (albeit in rare cases).


More information about the Glasgow-haskell-users mailing list