behaviour change in getDirectoryContents in GHC 7.2?

2011-11-01 Thread Ganesh Sittampalam
Hi, I'm just investigating what we can do about a problem with darcs' handling of non-ASCII filenames on GHC 7.2. The issue is apparently that as of GHC 7.2, getDirectoryContents now tries to decode filenames in the current locale, rather than converting a stream of bytes into characters:

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-01 Thread Max Bolingbroke
Hi Ganesh, On 1 November 2011 07:16, Ganesh Sittampalam gan...@earth.li wrote: Can anyone point me at the rationale and details of the change and/or suggest workarounds? This is my implementation of Python's PEP 383 [1] for Haskell. IMHO this behaviour is much closer to what users expect.For

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-01 Thread Felipe Almeida Lessa
On Tue, Nov 1, 2011 at 5:16 AM, Ganesh Sittampalam gan...@earth.li wrote: I'm just investigating what we can do about a problem with darcs' handling of non-ASCII filenames on GHC 7.2. The issue is apparently that as of GHC 7.2, getDirectoryContents now tries to decode filenames in the current

C, GCL interface

2011-11-01 Thread Serge D. Mechveliani
Dear GHC developers, There is a computer algebra library called DoCon and written in Haskell (+GHC). And I am considering the possibility to extend it with many new methods by joining some open libraries written in C, C++, and in Gnu Common Lisp (GCL). 1. I have seen somewhere the announcement

Re: C, GCL interface

2011-11-01 Thread Edward Kmett
The major concern that I would have is that if GCL or any of those math libraries uses GMP behind the scenes, which they probably do, then things will just start crashing on you, because GHC hooks the GMP allocator and will just start making the limbs of their numbers disappear. -Edward On Tue,

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-01 Thread John Millikin
You're right -- many parts of system-fileio (the parts based on directory) are broken due to this. I'll need to update it to call the posix/win32 functions directly. IMO, the GHC behavior in =7.0 is ugly, but the behavior in 7.2 is fundamentally wrong. Different OSes have different definitions

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-01 Thread Max Bolingbroke
Hi John, On 1 November 2011 17:14, John Millikin jmilli...@gmail.com wrote: GHC 7.2 assumes Linux/BSD paths are text, which 1) silently breaks all existing code and 2) makes it impossible to fix within the given API. Please can you give an example of code that is broken with the new behaviour?

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-01 Thread John Millikin
On Tue, Nov 1, 2011 at 11:43, Max Bolingbroke batterseapo...@hotmail.com wrote: Hi John, On 1 November 2011 17:14, John Millikin jmilli...@gmail.com wrote: GHC 7.2 assumes Linux/BSD paths are text, which 1) silently breaks all existing code and 2) makes it impossible to fix within the given