[MLton] Windows ports and paths

Wesley W. Terpstra wesley@terpstra.ca
Mon, 2 May 2005 19:07:26 +0200


On Mon, May 02, 2005 at 05:56:42PM +0200, Andreas Rossberg wrote:
> Wesley W. Terpstra wrote:
> >On Mon, May 02, 2005 at 05:12:43PM +0200, Andreas Rossberg wrote:
> >
> >>>I also special-cased concat (_, "") to behave as before.
> >>
> >>Mh, why is that preferable, when it deviates from the spec?
> >
> >It doesn't deviate..?
> >The previous version didn't keep a "/" on the end.
> 
> The spec's description implies it shouldn't keep it, so that would be 
> correct.
> 
> >ie: joinDirFile ("foo", "") = "foo" instead of "foo/"
> 
> Well, joinDirFile is a different function. Its second argument is 
> interpreted as an arc, not a path (*). It has no direct relation to concat.
> 
> (*) As an arc, "" is the empty arc, but as a path it's a path with no 
> arcs at all. At least that's what the spec says.

Oh... so you propose that concant("/foo", "") and joinDirfile("/foo", "")
should have different output. I misunderstood your previous email.

What do you think joinDirFile should do then? 
Simply (trimLastSlash dir) ^ slash ^ file?

Stephan?

-- 
Wesley W. Terpstra