[Haskell-cafe] System.FilePath, Request for comments

Neil Mitchell ndmitchell at gmail.com
Thu Jun 29 12:42:08 EDT 2006


Hi,

I have written a System.FilePath module in part based on the one in
Yhc, and in part based on the one in Cabal (thanks to Lemmih). The aim
is to try and get this module into the base package, as FilePath's are
something many programs use, but its all too easy to hack up a little
function that gets it right most of the time on most platforms, and
there lies a source of bugs.

This module is Posix (Linux) and Windows capable - just import
System.FilePath and it will pick the right one. Of course, if you
demand Windows paths on all OS's, then System.FilePath.Windows will
give you that (same with Posix). Written in Haskell 98 + Heirarchical
Modules.

Haddock: http://www-users.cs.york.ac.uk/~ndm/projects/filepath/System-FilePath.html
Darcs: darcs get http://www.cs.york.ac.uk/fp/darcs/filepath
Source: http://www.cs.york.ac.uk/fp/darcs/filepath/System/FilePath.hs
Homepage: http://www-users.cs.york.ac.uk/~ndm/projects/libraries.php
Tests: http://www.cs.york.ac.uk/fp/darcs/filepath/Tests.hs

If you go to the haddock page there are a few little examples at the
top of the file.

If anyone could make any comments on the interface, the semantics of
the operations (look at the Tests file if you don't want to go
prodding the code), missing features etc. that would be very handy.
The interface is not yet stable as a warning to those who choose to
use it (although I hope its close - that depends on your comments!)

Thanks

Neil

PS. Thanks to Marc Webber for code contributions, shapr for
suggestions and a few others.


More information about the Haskell-Cafe mailing list