You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed a minor issue in the implementation of OS.FileSys.readDir,
According to sml-family
readDir filters out the names corresponding to the current and parent arcs.
I had not quite figured out how to generate the whole .ans file, etc
(* Result: FAIL *)
(* Test OS.FileSys.readDir, should return false. *)
fun hasParentOrCurrentArc() =
let val cwd = OS.FileSys.openDir(OS.Path.currentArc)
fun hasParentOrCurrentArc(d, flag) =
let val entry = OS.FileSys.readDir(d)
fun check(entry) =
String.compare(entry, OS.Path.parentArc) = General.EQUAL
orelse String.compare(entry, OS.Path.currentArc) = General.EQUAL
fun ent (SOME entry, false) = hasParentOrCurrentArc(d, check(entry))
| ent (SOME entry, true) = true
| ent (NONE, flag) = flag
in ent (entry, flag)
end
in hasParentOrCurrentArc(cwd, false)
end
val a = hasParentOrCurrentArc();
The text was updated successfully, but these errors were encountered:
Noticed a minor issue in the implementation of OS.FileSys.readDir,
According to sml-family
I had not quite figured out how to generate the whole .ans file, etc
The text was updated successfully, but these errors were encountered: