[MLton-user] Re: MLton OS.Path under Windows [MLton-user Digest,
Vol 27, Issue 6]
Andreas Rossberg
rossberg at mpi-sws.mpg.de
Fri Nov 14 04:54:19 PST 2008
On Nov 14, 2008, at 10.01h, John Reppy wrote:
> Looking at the OS.Path specification, there is clearly an
> inconsistency in the definition of
> absolute paths on Windows. The confusion arises because Windows
> has the notion of a path
> that is absolute relative to the current volume (but not strictly
> absolute, since changing
> the volume changes its meaning). I'm not sure what the correct fix
> is. The path of least
> resistance might be to change the specification of toString to read
>
> The exception Path is raised if vol <> "" and validVolume{isAbs,
> vol} is false.
That would still allow fromString to deliver results that are not
considered "valid". For paths that are perfectly sensible.
I think the simpler and more coherent fix is to simply change
validVolume to allow empty volumes unconditionally on Windows.
> Alternatively, we could redefine the notion of absolute path on
> Windows to require a
> valid volume.
I fear that this would require quite a few (incompatible) changes
with the potential to break existing code in subtle ways.
Since we are at it, as I mentioned earlier (on the MLton list) I have
a number of other issues with inconsistencies in OS.Path. If you are
interested, I'd be happy to post them.
Best,
- Andreas
More information about the MLton-user
mailing list