[Haskell] ANN: System.FilePath 0.10

Neil Mitchell ndmitchell at gmail.com
Wed Nov 8 07:03:34 EST 2006

Hi Haskell,


I am hereby announcing System.FilePath 0.10, which hopefully is pretty
close to final now. This library manipulates FilePath's correctly on
both Posix and Windows.


(Includes a darcs repo, a .tar.gz, haddock documentation etc)

In this version I have made reasonably large changes:

* Lots of functions gone (temporary file handling, canonicalization,
drive manipulation, directory creation,  directory enumeration) -
pretty much down to only pure (non-IO methods) left.

* 3 new methods (asFile, isFile, asDirectory - look up the docs for
their meanings, but they are pretty small)

* Renamed functions to follow the scheme replace/take/drop instead of
set/get/drop - as suggested by Simon Marlow (since set/get implies
state operations in Haskell)

* Eliminated some duplicate functions (all functions are now different)

* Better handling of some obscure corner cases, particularly on
Windows with drive specifiers.

* Even more automated testing (211 properties, 75 of them QuickCheck properties)

This incorporates a large proportion of the suggestions that were
applicable to my library and its underlying design decisions.


Since this is a fairly large API change I have created
System.FilePath.Compat, which is identical to the old API. As a quick
fix import System.FilePath ==> import System.FilePath.Compat will work
fine. In the haddock documentation of the Compat module I
have included descriptions of what the new name of functions are

I really don't like breaking things for existing users, but the Compat
module should make it pretty easy to convert. If you do need any help
with the migration email me and I'll help as required. The Compat
module will remain around for the lifetime of this library, but will
not be submitted for inclusion into base.


As last time I released System.FilePath there was an 84 email long
thread, I think its probably best if I try and structure the
discussion this time so people can keep up with whats going on.

Can we start a discussion on haskell-cafe related to this
announcement, API names, API semantics and other general comments
regarding this library. What should be removed? What should be added?
What should be changed? I am very interested to see what people think,
and to make something everyone can use.

Please do not email on the main thread with anything related:

* objections to the concept of putting a FilePath library in base (I'm
not asking for that now, but I will be in future, feel free to flame
me then)

* objections to the concept of "type FilePath = String". This is the
way it is (although feel free to start a separate discussion on this,
if you want)


Thanks for everyone who gave suggestions and help on this (Lemmih,
dcoutts, JaffaCake, the rest of the Yhc team, Issac, shapr, #haskell,
Marc Webber, David House, Matt, lots of others). Thanks also to QuickCheck,
without which this library would be much less reliable.



More information about the Haskell mailing list