[MLton] cvs commit: OS.Path.joinDirFile does not check argument

Stephen Weeks MLton@mlton.org
Thu, 3 Feb 2005 16:35:57 -0800


After the fix, MLton behaves differently than all other
implementations on

    OS.Path.joinDirFile {dir = "", file = ""}

MLton raises InvalidArc, while other implementations return "".
MLton's behavior seems correct, since the spec says

    joinDirFile {dir, file}
       ... If the string file does not correspond to an arc, raises
       InvalidArc.    

and

    a non-empty string a corresponds to valid representation of an arc
    only if fromString a returns {isAbs=false, vol="", arcs=[a]}. 

All the implementations agree that fromString "" does indeed return 
{isAbs=false, vol="", arcs=[a]}.