On 07/05/10 20:32, Neil Mitchell wrote:
Hi Simon,

I notice this is only a 1 line change. Have you updated the properties as well?

Something got messed up in my darcs repository, and the patch was some kind of weird conflict. I pushed a subsequent one with the real changes. (you may remember we discussed this patch a few months ago on the libraries list, I only just got around to pushing it)

> Have you run the QuickCheck test that ensures these properties are
> still correct? The properties are both documentation and tests.

Yes I did run the tests, and I added and removed a few properties. I got some occasional failures with obscure Windows UNC paths, but I think that was also the case before - you could probably reproduce it quite easily, just run the tests a few times.

Cheers,
        Simon

Thanks, Neil

On Wed, May 5, 2010 at 1:48 PM, Simon Marlow<[email protected]>  wrote:
Wed Nov  4 01:51:09 PST 2009  Simon Marlow<[email protected]>
  * The current directory is ".", not "" (GHC bug #2034) (patch version 2)

  So now
          splitFileName "foo" = ("./", "foo")

  which gives us the additional property that

  >  Valid x =>  isValid (fst (splitFileName x))

  This property is important, because it means that we can pass the
  result of takeDirectory to any of the functions in System.Directory,
  whereas previously we would have to check for the empty case first.

  After discussion on the libraries list, I removed the second part of
  the original change:

          "."</>  x = x

  This small bit of normalisation was there to ensure that the property

  >  Valid x =>  uncurry</>  (splitFileName x) == x

  still held.  However, it was arguably inconsistent (see the
  discussion).  Now this property has an exception:

  >  Valid x =>  uncurry (</>) (splitFileName x) == x || fst (splitFileName x) == 
"./"

  This is a small price to pay to gain the new property above.

    M ./System/FilePath/Internal.hs +1

View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=packages/filepath;a=darcs_commitdiff;h=20091104095109-12142-8166ae12d0b2fe782134d15700beba5cfd555bef.gz
_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries


_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to