[Haskell-cafe] RE: ANN: System.FilePath 0.9

David Roundy droundy at darcs.net
Wed Jul 26 08:33:57 EDT 2006


On Wed, Jul 26, 2006 at 03:36:13AM +0100, Neil Mitchell wrote:

> >> pathSeparator :: Char
> >> The character that seperates directories.
> >So what do I do with this?  If I need it, it seems like the module has
> >failed.
> Hopefully no one will ever use it. Its part of the low level functions
> that the FilePath module builds on. However, pragmatically, someone
> somewhere will have a use for it, and the second they do they'll just
> write '/', and at that point we've lost.

I'd just point out that I'm not aware of an operating system that GHC
runs on that doesn't accept '/' as a path separator.  It may be that
you could fine an OS where you could compile with jhc or run with hugs
that doesn't use '/' (e.g. MacOS 9), but support for MacOS 9 at this
stage I wouldn't consider a high priority.  Since noone ought to need
the path separator, and since they can currently assume '/' without
loss of portability, it seems like adding in an extra function to
protect us from the introduction of an operating system some time in
the future that doesn't allow '/' as a path separator is a bit
much.

Of course, I may be wrong.  Does windows disallow mixing of '/' and
'\\' as path separators? In darcs we always just use '/' as all the
path separators, and it works fine...
-- 
David Roundy


More information about the Haskell-Cafe mailing list