[MLton] Windows ports and paths

Andreas Rossberg AndreasRossberg@web.de
Mon, 2 May 2005 20:20:45 +0200


> > 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.

Yes, at least that's how I interpret the spec. Whether that's nice is a
different issue...

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

I'd think so (plus the validity check for file, of course).

Er, on second thought, I think it shouldn't even trim the slash, because
nowhere is said that it should remove an eventual empty arc. Moreover, it's
not an inverse of splitDirFile when doing so.

  - Andreas