Christian Maeder | 15 Jan 15:42 2014
Picon

System.FilePath.splitFileName

Hi,

I suggest to improve the documentation for System.FilePath.splitFileName.

The sentence "combine is the inverse" (of splitFileName) is misleading, 
as the following example shows:

Prelude System.FilePath> uncurry combine $ splitFileName "bob"
"./bob"

adding normalize to the result only also gives not (String) identity:
Prelude System.FilePath> normalise $ uncurry combine $ splitFileName "./bob"
"bob"

I suggest to change it to:
"combine is the inverse modulo normalise or equalFilePath"

Maybe also the following combine examples should be added:
   combine "./" "bob" == "./bob"
   combine "." "bob" == "./bob"

http://www.haskell.org/ghc/docs/latest/html/libraries/filepath-1.3.0.1/System-FilePath-Posix.html#g:5

Cheers Christian

Gmane