Closed mpilgrem closed 8 months ago
The filepath package provides System.FilePath.takeDrive :: FilePath -> FilePath. It would be useful to have a well-typed version.
filepath
System.FilePath.takeDrive :: FilePath -> FilePath
EDIT: The motivation is to avoid the round-tripping in this code from the Stack project:
destDrive = fromJust $ parseAbsDir $ takeDrive $ fromAbsDir destDir
I see no issue with this. PR welcome.
A pull request, including additions to the tests, is a work-in-progress.
The
filepath
package providesSystem.FilePath.takeDrive :: FilePath -> FilePath
. It would be useful to have a well-typed version.EDIT: The motivation is to avoid the round-tripping in this code from the Stack project: