Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-10 Thread John Millikin
On Thu, Nov 10, 2011 at 03:28, Simon Marlow marlo...@gmail.com wrote: I've done a search/replace and called it RawFilePath.  Ok? Fantastic, thank you very much. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-09 Thread John Millikin
On Wed, Nov 9, 2011 at 08:04, Simon Marlow marlo...@gmail.com 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:

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-08 Thread John Millikin
On Tue, Nov 8, 2011 at 03:04, Simon Marlow marlo...@gmail.com wrote: As mentioned earlier in the thread, this behavior is breaking things. Due to an implementation error, programs compiled with GHC 7.2 on POSIX systems cannot open files unless their paths also happen to be valid text according

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-07 Thread John Millikin
On Mon, Nov 7, 2011 at 09:02, Simon Marlow marlo...@gmail.com wrote: I think you might be misunderstanding how the new API works.  Basically, imagine a reversible transformation:  encode :: String - [Word8]  decode :: [Word8] - String this transformation is applied in the appropriate

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-07 Thread John Millikin
On Mon, Nov 7, 2011 at 15:39, Yitzchak Gale g...@sefer.org wrote: The problem is that Haskell 98 specifies type FilePath = String. In retrospect, we now know that this is too simplistic. But that's what we have right now. This is *a* problem, but not a particularly major one; the definition of

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-06 Thread John Millikin
2011/11/6 Max Bolingbroke batterseapo...@hotmail.com: On 6 November 2011 04:14, John Millikin jmilli...@gmail.com wrote: For what it's worth, on my Ubuntu system, Nautilus ignores the locale and just treats all paths as either UTF8 or invalid. To me, this seems like the most reasonable option

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-05 Thread John Millikin
FYI: I just released new versions of system-filepath and system-fileio, which attempt to work around the changes in GHC 7.2. On Wed, Nov 2, 2011 at 11:55, Max Bolingbroke batterseapo...@hotmail.com wrote: Maybe I'm misunderstanding, but it sounds like you're still trying to treat posix file

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-02 Thread John Millikin
On Wed, Nov 2, 2011 at 06:53, Max Bolingbroke batterseapo...@hotmail.com wrote: I've got a patch that will work around the issue in most situations by avoiding the iconv code path. With the patch everything will work OK as long as the system locale is one that we have a native-Haskell decoder

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-01 Thread John Millikin
) Can anyone point me at the rationale and details of the change and/or suggest workarounds? You could try using system-fileio [1], but by reading its source code I guess that it may have the same bug (since it tries to decode what the directory package gives).  I'm CCing John Millikin, its

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