packages/filepath.git
3 years ago#12, note that this library helps move towards an abstract filepath type
Neil Mitchell [Tue, 22 Dec 2015 08:12:43 +0000 (08:12 +0000)] 
#12, note that this library helps move towards an abstract filepath type

3 years ago#49, move the docs from combine to </>, which is the one most people use
Neil Mitchell [Tue, 22 Dec 2015 08:10:35 +0000 (08:10 +0000)] 
#49, move the docs from combine to </>, which is the one most people use

3 years ago#49, move the docs from </> to combine, so its all in one place
Neil Mitchell [Tue, 22 Dec 2015 08:07:21 +0000 (08:07 +0000)] 
#49, move the docs from </> to combine, so its all in one place

3 years ago#49, fix up the Haddock markup in the docs for combine
Neil Mitchell [Tue, 22 Dec 2015 08:06:22 +0000 (08:06 +0000)] 
#49, fix up the Haddock markup in the docs for combine

3 years ago#50, document makeRelative and explain why it doesn't introduce .. paths
Neil Mitchell [Tue, 22 Dec 2015 08:02:30 +0000 (08:02 +0000)] 
#50, document makeRelative and explain why it doesn't introduce .. paths

3 years ago#12, add notes on why FilePath isn't abstract
Neil Mitchell [Tue, 22 Dec 2015 07:51:11 +0000 (07:51 +0000)] 
#12, add notes on why FilePath isn't abstract

3 years ago#51, add some documentation around splitSearchPath
Neil Mitchell [Tue, 22 Dec 2015 07:27:45 +0000 (07:27 +0000)] 
#51, add some documentation around splitSearchPath

3 years agoDon't allow GHC HEAD failures
Neil Mitchell [Fri, 18 Dec 2015 12:13:01 +0000 (12:13 +0000)] 
Don't allow GHC HEAD failures

3 years agoUpdate the version number
Neil Mitchell [Mon, 2 Nov 2015 12:05:08 +0000 (12:05 +0000)] 
Update the version number

3 years agoRelax upper bound on `base` to allow base-4.9
Herbert Valerio Riedel [Sun, 1 Nov 2015 08:24:45 +0000 (09:24 +0100)] 
Relax upper bound on `base` to allow base-4.9

GHC 8.0 is going to bundle `base-4.9.0.0`

3 years agoUpdated badges
Neil Mitchell [Wed, 28 Oct 2015 16:07:53 +0000 (16:07 +0000)] 
Updated badges

3 years agoUse the correct stack command
Neil Mitchell [Tue, 27 Oct 2015 06:40:25 +0000 (06:40 +0000)] 
Use the correct stack command

3 years agoAllow testsuite failures on GHC HEAD
Neil Mitchell [Mon, 26 Oct 2015 21:27:53 +0000 (21:27 +0000)] 
Allow testsuite failures on GHC HEAD

3 years agoMove the doc files to extra-doc-files
Neil Mitchell [Mon, 26 Oct 2015 21:19:30 +0000 (21:19 +0000)] 
Move the doc files to extra-doc-files

3 years agoCreate appveyor.yml
Neil Mitchell [Mon, 26 Oct 2015 21:11:22 +0000 (21:11 +0000)] 
Create appveyor.yml

4 years ago#46, fix a documentation mistake
Neil Mitchell [Wed, 20 May 2015 14:03:42 +0000 (15:03 +0100)] 
#46, fix a documentation mistake

4 years agoMerge pull request #45 from kraai/patch-1
Neil Mitchell [Thu, 14 May 2015 15:29:31 +0000 (16:29 +0100)] 
Merge pull request #45 from kraai/patch-1

Fix the spelling of "example"

4 years agoFix the spelling of "example"
kraai [Thu, 14 May 2015 15:27:28 +0000 (15:27 +0000)] 
Fix the spelling of "example"

4 years ago#44, clarify that isValid doesn't check length limits
Neil Mitchell [Thu, 23 Apr 2015 19:53:39 +0000 (20:53 +0100)] 
#44, clarify that isValid doesn't check length limits

4 years ago#44, isValid \0 now returns False
Neil Mitchell [Thu, 23 Apr 2015 14:19:35 +0000 (15:19 +0100)] 
#44, isValid \0 now returns False

4 years agoMerge branch 'master' of https://github.com/haskell/filepath v1.4.0.0
Neil Mitchell [Thu, 12 Mar 2015 18:56:22 +0000 (18:56 +0000)] 
Merge branch 'master' of https://github.com/haskell/filepath

4 years agoGHC 7.8.4
Neil Mitchell [Thu, 12 Mar 2015 18:56:10 +0000 (18:56 +0000)] 
GHC 7.8.4

4 years agoMerge pull request #41 from Rufflewind/master
Neil Mitchell [Wed, 11 Mar 2015 06:52:19 +0000 (06:52 +0000)] 
Merge pull request #41 from Rufflewind/master

Refer to `makeAbsolute` instead of `canonicalizePath` in docs

4 years agoRefer to `makeAbsolute` instead of `canonicalizePath` in docs
Phil Ruffwind [Wed, 11 Mar 2015 05:58:09 +0000 (01:58 -0400)] 
Refer to `makeAbsolute` instead of `canonicalizePath` in docs

4 years agoUpdate version to 1.4.0.0 in preparation for GHC 7.10 release (Edward Kmett recommend...
Neil Mitchell [Tue, 10 Mar 2015 21:15:28 +0000 (21:15 +0000)] 
Update version to 1.4.0.0 in preparation for GHC 7.10 release (Edward Kmett recommends a 0.1 version bump)

4 years agoDelete the random constraint, was not required
Neil Mitchell [Mon, 9 Mar 2015 21:48:58 +0000 (21:48 +0000)] 
Delete the random constraint, was not required

4 years agoTighten the QuickCheck lower bound on the test suite, shrinkList was only introduced...
Neil Mitchell [Mon, 9 Mar 2015 21:48:44 +0000 (21:48 +0000)] 
Tighten the QuickCheck lower bound on the test suite, shrinkList was only introduced in 2.7

4 years agoUpdate the copyright year to 2015
Neil Mitchell [Mon, 9 Mar 2015 21:48:02 +0000 (21:48 +0000)] 
Update the copyright year to 2015

4 years agoTest on GHC 7.10.1
Neil Mitchell [Mon, 9 Mar 2015 21:47:51 +0000 (21:47 +0000)] 
Test on GHC 7.10.1

4 years agoFixup markdown
Neil Mitchell [Sat, 13 Dec 2014 21:16:50 +0000 (21:16 +0000)] 
Fixup markdown

4 years agoAvoid using isJust/fromJust, switch to pattern guards
Neil Mitchell [Fri, 21 Nov 2014 16:30:25 +0000 (16:30 +0000)] 
Avoid using isJust/fromJust, switch to pattern guards

4 years agoChange to https links
Neil Mitchell [Fri, 21 Nov 2014 08:25:16 +0000 (08:25 +0000)] 
Change to https links

4 years agoWhen there is a failure, show the QuickCheck output in a better format
Neil Mitchell [Mon, 10 Nov 2014 18:14:11 +0000 (18:14 +0000)] 
When there is a failure, show the QuickCheck output in a better format

4 years ago#22, put back in some makeRelative tests, far more restricted
Neil Mitchell [Mon, 10 Nov 2014 18:13:55 +0000 (18:13 +0000)] 
#22, put back in some makeRelative tests, far more restricted

4 years agoBump the version after adding -<.> and changing semantics
Neil Mitchell [Mon, 10 Nov 2014 11:30:47 +0000 (11:30 +0000)] 
Bump the version after adding -<.> and changing semantics

4 years ago#10, more concrete examples
Neil Mitchell [Mon, 10 Nov 2014 11:15:54 +0000 (11:15 +0000)] 
#10, more concrete examples

4 years agoOptimise isPathSeparator
Neil Mitchell [Mon, 10 Nov 2014 11:15:23 +0000 (11:15 +0000)] 
Optimise isPathSeparator

4 years ago#11, give better section titles
Neil Mitchell [Mon, 10 Nov 2014 11:15:11 +0000 (11:15 +0000)] 
#11, give better section titles

4 years ago#11, more top-level documentation
Neil Mitchell [Mon, 10 Nov 2014 11:14:51 +0000 (11:14 +0000)] 
#11, more top-level documentation

4 years agoIf there is an error, show the messages again at the end, so you don't have to scroll...
Neil Mitchell [Mon, 10 Nov 2014 11:05:56 +0000 (11:05 +0000)] 
If there is an error, show the messages again at the end, so you don't have to scroll back

4 years agoNote that any is a Prelude function
Neil Mitchell [Mon, 10 Nov 2014 11:05:31 +0000 (11:05 +0000)] 
Note that any is a Prelude function

4 years ago#9, add -<.> as an alias for replaceExtension
Neil Mitchell [Mon, 10 Nov 2014 07:33:44 +0000 (07:33 +0000)] 
#9, add -<.> as an alias for replaceExtension

4 years agoRequire GHC Head to pass
Neil Mitchell [Tue, 4 Nov 2014 20:18:16 +0000 (20:18 +0000)] 
Require GHC Head to pass

4 years agoTry making the travis script work even after you break directory
Neil Mitchell [Tue, 4 Nov 2014 20:02:27 +0000 (20:02 +0000)] 
Try making the travis script work even after you break directory

4 years agoDon't use Extra in the travis script, since filepath is required by extra
Neil Mitchell [Tue, 4 Nov 2014 19:21:35 +0000 (19:21 +0000)] 
Don't use Extra in the travis script, since filepath is required by extra

4 years agoAdd a note that TestGen is generated
Neil Mitchell [Mon, 3 Nov 2014 15:51:14 +0000 (15:51 +0000)] 
Add a note that TestGen is generated

4 years agoImprove the generator
Neil Mitchell [Mon, 3 Nov 2014 15:50:17 +0000 (15:50 +0000)] 
Improve the generator

4 years agoImprove the formatting of the generated code, makes the messages more pleasant
Neil Mitchell [Mon, 3 Nov 2014 15:50:08 +0000 (15:50 +0000)] 
Improve the formatting of the generated code, makes the messages more pleasant

4 years agoSupport :go taking a numeric argument
Neil Mitchell [Mon, 3 Nov 2014 15:49:50 +0000 (15:49 +0000)] 
Support :go taking a numeric argument

4 years agoTurn off chatty tests, otherwise we exceed the travis size limit
Neil Mitchell [Mon, 3 Nov 2014 10:57:17 +0000 (10:57 +0000)] 
Turn off chatty tests, otherwise we exceed the travis size limit

4 years ago#37, let the generator take an argument of the number of tests
Neil Mitchell [Mon, 3 Nov 2014 10:50:14 +0000 (10:50 +0000)] 
#37, let the generator take an argument of the number of tests

4 years ago#37, rewrite the generator
Neil Mitchell [Mon, 3 Nov 2014 10:44:17 +0000 (10:44 +0000)] 
#37, rewrite the generator

4 years agoAdd newtypes for valid paths on Windows and Posix, make sure to be smart about shrink...
Neil Mitchell [Sun, 2 Nov 2014 22:00:38 +0000 (22:00 +0000)] 
Add newtypes for valid paths on Windows and Posix, make sure to be smart about shrinking with valid function

4 years agoAdd an explicit export list to the generator
Neil Mitchell [Sun, 2 Nov 2014 21:48:13 +0000 (21:48 +0000)] 
Add an explicit export list to the generator

4 years agoRemove the QChar type, rewrite an arbitraryFilePath type
Neil Mitchell [Sun, 2 Nov 2014 21:47:09 +0000 (21:47 +0000)] 
Remove the QChar type, rewrite an arbitraryFilePath type

4 years agoMake off the things in the generator which are utilities
Neil Mitchell [Sun, 2 Nov 2014 21:46:30 +0000 (21:46 +0000)] 
Make off the things in the generator which are utilities

4 years agoMerge pull request #36 from thomie/searchPath
Neil Mitchell [Sat, 1 Nov 2014 19:12:52 +0000 (19:12 +0000)] 
Merge pull request #36 from thomie/searchPath

Remove double quotes around searchPath elements on Windows

4 years agoRemove double quotes around searchPath elements on Windows
Thomas Miedema [Sat, 1 Nov 2014 17:39:42 +0000 (18:39 +0100)] 
Remove double quotes around searchPath elements on Windows

4 years agoMerge pull request #35 from thomie/splitExtensions
Neil Mitchell [Sat, 1 Nov 2014 13:08:40 +0000 (13:08 +0000)] 
Merge pull request #35 from thomie/splitExtensions

Refactor and fix test for splitExtension(s)

4 years agoRefactor: don't use reverse explicitly (#6)
Thomas Miedema [Sat, 1 Nov 2014 12:32:37 +0000 (13:32 +0100)] 
Refactor: don't use reverse explicitly (#6)

I couldn't decide between the different implementations of dropWhileEnd and
takeWhileEnd from https://ghc.haskell.org/trac/ghc/ticket/9623#comment:7, so I
choose the simplest solution using two times reverse instead of foldr. See
also:
https://www.haskell.org/pipermail/libraries/2014-September/023835.html

4 years agoAdd 'Valid x =>' to splitExtension(s) QuickCheck property (#34)
Thomas Miedema [Fri, 31 Oct 2014 22:52:26 +0000 (23:52 +0100)] 
Add 'Valid x =>' to splitExtension(s) QuickCheck property (#34)

4 years agoCleanup: explicit is better than implicit
Thomas Miedema [Fri, 31 Oct 2014 22:50:04 +0000 (23:50 +0100)] 
Cleanup: explicit is better than implicit

4 years agoRemove the Expr constructor from the Generate module
Neil Mitchell [Wed, 29 Oct 2014 09:27:20 +0000 (09:27 +0000)] 
Remove the Expr constructor from the Generate module

4 years agoAlways generate test, and always use quickCheck even for constant values
Neil Mitchell [Wed, 29 Oct 2014 09:22:44 +0000 (09:22 +0000)] 
Always generate test, and always use quickCheck even for constant values

4 years agoOnly write out a new generated file if it has changed
Neil Mitchell [Wed, 29 Oct 2014 09:19:18 +0000 (09:19 +0000)] 
Only write out a new generated file if it has changed

4 years agoAd a new Test module to sit in front of the generated tests, move the generate code...
Neil Mitchell [Wed, 29 Oct 2014 09:13:36 +0000 (09:13 +0000)] 
Ad a new Test module to sit in front of the generated tests, move the generate code to TestGen

4 years agoRename AutoTest to TestUtil
Neil Mitchell [Wed, 29 Oct 2014 08:31:02 +0000 (08:31 +0000)] 
Rename AutoTest to TestUtil

4 years agoRemove missing imports from AutoTest
Neil Mitchell [Wed, 29 Oct 2014 08:28:11 +0000 (08:28 +0000)] 
Remove missing imports from AutoTest

4 years agoFix up the .ghci file so it loads the tests
Neil Mitchell [Wed, 29 Oct 2014 08:28:02 +0000 (08:28 +0000)] 
Fix up the .ghci file so it loads the tests

4 years agoChange the generated file to be in module Test
Neil Mitchell [Wed, 29 Oct 2014 08:27:15 +0000 (08:27 +0000)] 
Change the generated file to be in module Test

4 years agoSimplify the :docs_ target
Neil Mitchell [Wed, 29 Oct 2014 08:22:18 +0000 (08:22 +0000)] 
Simplify the :docs_ target

4 years agoUse W and P for the qualifications in ghci, so its test suite compatible
Neil Mitchell [Wed, 29 Oct 2014 08:22:04 +0000 (08:22 +0000)] 
Use W and P for the qualifications in ghci, so its test suite compatible

4 years agoLoad the generator into ghci
Neil Mitchell [Wed, 29 Oct 2014 08:21:47 +0000 (08:21 +0000)] 
Load the generator into ghci

4 years agoRename FilePath_Test to Test
Neil Mitchell [Wed, 29 Oct 2014 08:10:34 +0000 (08:10 +0000)] 
Rename FilePath_Test to Test

4 years agoDelete all the GHC test suite stuff, FilePath is now GHC test-suite free
Neil Mitchell [Wed, 29 Oct 2014 08:08:05 +0000 (08:08 +0000)] 
Delete all the GHC test suite stuff, FilePath is now GHC test-suite free

4 years agoBasic generator cleanups
Neil Mitchell [Wed, 29 Oct 2014 08:04:26 +0000 (08:04 +0000)] 
Basic generator cleanups

4 years agoChange the generator to write a file with Unix line endings on all platforms
Neil Mitchell [Wed, 29 Oct 2014 08:02:59 +0000 (08:02 +0000)] 
Change the generator to write a file with Unix line endings on all platforms

4 years agoAdd a travis.hs script to ensure the generator ran
Neil Mitchell [Wed, 29 Oct 2014 08:01:04 +0000 (08:01 +0000)] 
Add a travis.hs script to ensure the generator ran

4 years agoUpdate the tested-with line to what we currently test against
Neil Mitchell [Wed, 29 Oct 2014 08:00:48 +0000 (08:00 +0000)] 
Update the tested-with line to what we currently test against

4 years agoMove to the neil standard test
Neil Mitchell [Wed, 29 Oct 2014 08:00:28 +0000 (08:00 +0000)] 
Move to the neil standard test

4 years agoRemove the really old GHC tests, no longer interesting (although no intention of...
Neil Mitchell [Wed, 29 Oct 2014 07:32:26 +0000 (07:32 +0000)] 
Remove the really old GHC tests, no longer interesting (although no intention of breaking it)

4 years agoMove the generator
Neil Mitchell [Wed, 29 Oct 2014 07:31:51 +0000 (07:31 +0000)] 
Move the generator

4 years agoSince the generated code is checked in, no need to run the generator
Neil Mitchell [Wed, 29 Oct 2014 07:31:28 +0000 (07:31 +0000)] 
Since the generated code is checked in, no need to run the generator

4 years agoCheck in the filepath tests
Neil Mitchell [Wed, 29 Oct 2014 07:26:04 +0000 (07:26 +0000)] 
Check in the filepath tests

4 years agoReformat and make everything consistent, don't quote \, or it gets too confusing
Neil Mitchell [Tue, 28 Oct 2014 21:42:36 +0000 (21:42 +0000)] 
Reformat and make everything consistent, don't quote \, or it gets too confusing

4 years agoMerge pull request #33 from thomie/arbitrary
Neil Mitchell [Tue, 28 Oct 2014 20:53:46 +0000 (20:53 +0000)] 
Merge pull request #33 from thomie/arbitrary

Remove "|bcd123" from character set for tests (#15)

4 years agoRemove "|bcd123" from character set for tests (#15)
Thomas Miedema [Tue, 28 Oct 2014 20:17:38 +0000 (21:17 +0100)] 
Remove "|bcd123" from character set for tests (#15)

4 years agoMerge pull request #32 from thomie/unc
Neil Mitchell [Tue, 28 Oct 2014 20:05:49 +0000 (20:05 +0000)] 
Merge pull request #32 from thomie/unc

Bug fix: isValid "\\\\?\\D:file" == False

4 years agoPut "Valid x =>" constraint on joinDrive QuickCheck property
Thomas Miedema [Tue, 28 Oct 2014 18:57:32 +0000 (19:57 +0100)] 
Put "Valid x =>" constraint on joinDrive QuickCheck property

Counterexample:

    $ let x = "\\\\?\\D:file"
    $ splitDrive x
    ("\\\\?\\D:","file")
    $ uncurry joinDrive (splitDrive x)
    "\\\\?\\D:\\file"

The "problem" is that the current implementation of splitDrive can sometimes
return invalid drives, such as in the above example. However, if it wouldn't
do so, it would make the implementation of isValid and makeValid more
difficult.

My guideline is currently as follows: splitDrive makes the rough cut of what
is and what isn't a drive, isValid and makeValid finish the job, all other
functions assume drives and paths are valid.

This is also the reason joinDrive (=combineAlways) should not be changed to
not insert the extra slash, solely to handle an invalid path.

4 years agoBug fix: isValid "\\\\?\\D:file" == False
Thomas Miedema [Tue, 28 Oct 2014 18:55:42 +0000 (19:55 +0100)] 
Bug fix: isValid "\\\\?\\D:file" == False

From http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx:

* "A UNC name of any format [is never relative]."

* "You cannot use the "\\?\" prefix with a relative path."

4 years agoRefactor isValid and makeValid
Thomas Miedema [Tue, 28 Oct 2014 18:16:52 +0000 (19:16 +0100)] 
Refactor isValid and makeValid

`head (splitPath path)` is not equal to `takeDrive path` in general:

    head (splitPath "\\foo") == "\\"
    fst (splitDrive "\\foo") == ""

We can do this refactoring because they /are/ equal within the
constraint:

    `length drv >= 2 && all isPathSeparator drv`

4 years agoMerge pull request #31 from thomie/output
Neil Mitchell [Tue, 28 Oct 2014 15:19:35 +0000 (15:19 +0000)] 
Merge pull request #31 from thomie/output

quickSafe: do not call show on already escaped output (#30)

4 years agoquickSafe: do not call show on already escaped output (#30)
Thomas Miedema [Tue, 28 Oct 2014 14:22:35 +0000 (15:22 +0100)] 
quickSafe: do not call show on already escaped output (#30)

This output:

   *** Failed! ... QFilePath "/\\?/a:a"

is much easier to digest than:

   "*** FAILED! ... \NQFILEPATH \"/\\\\?/A:A\"\N"

4 years agoMerge pull request #29 from thomie/bugFixes
Neil Mitchell [Mon, 27 Oct 2014 21:09:33 +0000 (21:09 +0000)] 
Merge pull request #29 from thomie/bugFixes

Bug fixes for normalise #12

4 years agoChange min QuickCheck version back to 2.6 (#28)
Thomas Miedema [Mon, 27 Oct 2014 20:47:05 +0000 (21:47 +0100)] 
Change min QuickCheck version back to 2.6 (#28)

4 years agoRevert "Make splitFileName quickcheck test Posix only" (#14)
Thomas Miedema [Mon, 27 Oct 2014 13:32:26 +0000 (14:32 +0100)] 
Revert "Make splitFileName quickcheck test Posix only" (#14)

This reverts commit 0dd40adf8d4a8a3f409f3a877dba2ae7e98a5c5b.

4 years agoBug fix: normalise "C:.\\" == "C:"
Thomas Miedema [Mon, 27 Oct 2014 18:47:44 +0000 (19:47 +0100)] 
Bug fix: normalise "C:.\\" == "C:"

Another other option would be `normalise "C:.\\" == "C:.\\"`, but this is
nicer since we already have:

> normalise "C:.\\foo"
"C:foo"

4 years agoBug fix: normalise "//home" == "/home" (Posix)
Thomas Miedema [Mon, 27 Oct 2014 17:53:33 +0000 (18:53 +0100)] 
Bug fix: normalise "//home" == "/home" (Posix)

4 years agoBug fix: normalise "/./" == "/" on Posix, "\\" on Windows
Thomas Miedema [Mon, 27 Oct 2014 15:04:48 +0000 (16:04 +0100)] 
Bug fix: normalise "/./" == "/" on Posix, "\\" on Windows

4 years agoMerge pull request #26 from thomie/makeRelative
Neil Mitchell [Mon, 27 Oct 2014 14:40:11 +0000 (14:40 +0000)] 
Merge pull request #26 from thomie/makeRelative

Reenable test #25 and bug fix for makeRelative