behaviour change in getDirectoryContents in GHC 7.2?

Max Bolingbroke batterseapower at
Thu Nov 3 10:41:32 CET 2011

On 2 November 2011 21:46, Ganesh Sittampalam <ganesh at> wrote:
> The workaround you propose seems a little complex and it might be a bit
> problematic that 100% roundtripping can't be guaranteed even once your
> fix is applied.

I can understand this perspective, although the roundtripping as
implemented will only fail in certain very obscure cases.

> Do you think it would be reasonable/feasible for darcs
> to have its own version of getDirectoryContents that doesn't try to do
> any translation in the first place? It might make sense to make a
> separate package that others could use to.

Yes, absolutely! I think a very valuable contribution would be a
package providing filesystem functions (with an abstract FilePath
type) that is portable across Windows, OS X and *nix-like OSes. This
would be a useful package for anyone who wants to avoid the
performance (and very rare correctness) problems associated with

> BTW I was trying to find the patch where this changed but couldn't - was
> it a consequence of
> ?

That is the main patch. I had to patch the libraries as well to make
use of the changed encodings. See (for example)


More information about the Glasgow-haskell-users mailing list