haskell / haskell/filepath

Make extension methods ignore drives

Open
#39 4 comments 0 reactions 0 assignees View on GitHub
enhancement ghc-8.2
Dominant language
Haskell
Stars
74
Forks
38
PR merge metrics
No merged PRs in 30d

Description

In the Windows version of the API, `"//foo" <.> "txt" == "//foo\\.txt"`. That's not what anyone expects, and doesn't match the .NET conventions for filepaths. It also means Shake can't use the `<.>` FilePath operator with its file globbing syntax as per https://github.com/ndmitchell/shake/issues/198 (which isn't super important, but does hint it might be desirable to change).

My thoughts are the extension of a filepath should be the bit after both the final `pathSeparator` and final `.` character. That's a simple definition, consistent with the Posix version, and only changes things in the not-a-complete-UNC-path case, which isn't really a valid FilePath anyway. Plus it probably matches what everyone thinks the operator does anyway.

I have a slight concern here that I might be biased towards doing something that makes it easier for Shake, but is ultimately the wrong thing to do, since I've spent a lot of time on Shake. If anyone else thinks I'm wrong, or even right, please yell.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.