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 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 http://www.haskell.org/mailman/list

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 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: > > http://community.haskell.org/~simonmar/unix-

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 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 to their l

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 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 paths in GH

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 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 direction by the

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-06 Thread John Millikin
2011/11/6 Max Bolingbroke : > On 6 November 2011 04:14, John Millikin 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; the conc

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 wrote: >> Maybe I'm misunderstanding, but it sounds like you're still trying to >> treat posix file paths as text. There shoul

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 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 for (i.e. basically UTF

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 wrote: > Hi John, > > On 1 November 2011 17:14, John Millikin 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. > > Ple

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-01 Thread John Millikin
fe/2009-June/062795.html and >> some GHC tickets (e.g. http://hackage.haskell.org/trac/ghc/ticket/3300) >> >> 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 s