Proposal: System.FilePath: current directory should be ".", not
""
Neil Mitchell
ndmitchell at gmail.com
Thu Nov 5 15:36:30 EST 2009
I agree with the idea behind this proposal, but am pretty sure it will
break quite a few filepath things that I maintain. So +1, but also +1
for a really strong release announcement and version bump.
The problem with filepaths is that they lack much structure, and are
very system dependent - meaning every change will break something. A
lovely abstract type would be wonderful, but no one has yet released
such a library on hackage...
Thanks, Neil
2009/11/4 Duncan Coutts <duncan.coutts at googlemail.com>:
> On Wed, 2009-11-04 at 10:00 +0000, Simon Marlow wrote:
>
>> I've amended the patch as suggested above, it turned out to be not too
>> hard.
>
> [..]
>
>> Neil's comprehensive test suite still passes with the new patch.
>>
>> Ticket, with new patch attached:
>>
>> http://hackage.haskell.org/trac/ghc/ticket/2034
>>
>> The discussion deadline has long passed, so I propose we have another 2
>> weeks (18 November).
>
> I support this new proposal.
>
>
> To summarise for people who have not been paying full attention:
>
> Currently:
> takeDirectory "Main.hs" = ""
>
> Proposed:
> takeDirectory "Main.hs" = "./"
>
> The purpose being that one can always take the directory and get a valid
> path to use with a file system function, eg createDirectory.
>
>
> Unchanged behaviour:
>
> "./" </> "Main.hs" = "./Main.hs"
>
> It was initially proposed that </> eat "./" on the left hand side but
> the current proposal leaves the behaviour of </> unchanged.
>
> Duncan
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
More information about the Libraries
mailing list