[MLton] Windows ports and paths

Wesley W. Terpstra wesley@terpstra.ca
Tue, 3 May 2005 00:09:38 +0200


Argh... can't leave it alone.

On Mon, May 02, 2005 at 02:50:10PM -0700, Stephen Weeks wrote:
> fun joinDirFile {dir, file} =
>    if dir = "" andalso file = ""
>       then ""
>    else
>       let
> 	 val {arcs, isAbs, vol} = fromString dir
>       in
> 	 toString {arcs = concatArcs (arcs, [file]),
> 		   isAbs = isAbs,
> 		   vol = vol}
>       end

What you wrote doesn't work for dir="C:" and file=""... 
InvalidArc is raised.

-- 
Wesley W. Terpstra <wesley@terpstra.ca>