[MLton] bug report, vector of char problem
Scott Cruzen
sic@lerp.com
Tue, 5 Apr 2005 13:03:06 -0700
(*
I've checked this against 20041109 and CVS as of 0404
*)
val v = Vector.tabulate (10,
(fn x =>
let
fun toChar x = Char.chr (Char.ord #"0" + x)
in
(toChar 0, toChar x, x)
end))
val x = Vector.sub (v, 8)
(* uncomment the following lines and MLton generates a correct program
*)
(*
val _ =
if Time.compare (Time.now(), Time.zeroTime) = EQUAL then
print (Int.toString (#3 x))
else
()
*)
val _ = print "should be 08\n"
val _ = print (str (#1 x) ^ str (#2 x) ^ "\n")