Here's a demonstration on Linux:
λ Path x = [Path.Posix.reldir|.|]
λ x
""
λ Path x = [Path.Windows.reldir|.|]
λ x
".\\"
The root cause of the problem is that our definition of relRootFP uses the platform-dependent System.FilePath.pathSeparator:
|
-- | Normalized file path representation for the relative path root |
|
relRootFP :: FilePath |
|
relRootFP = '.' : [FilePath.pathSeparator] |
A fix should probably move relRootFP into Path.Include.