From: Peter Jolly <peter@jo...> - 2004-01-11 00:33:33
It appears that the Std.input_list function always returns  when
called from native code:
$ cat > test.ml
let c = open_in "test.ml" in
let l = Std.input_list c in
print_int (List.length l);
$ ocamlc -o ex extLib.cma test.ml && ./ex
$ ocamlopt -o ex extlib.cmxa test.ml && ./ex
This is with ExtLib 1.0b (with the Obj.set_field fix applied to std.ml)
and OCaml 3.07.
From: Nicolas Cannasse <warplayer@fr...> - 2004-01-14 21:23:59
> It appears that the Std.input_list function always returns  when
> called from native code:
Thanks for the report !
It was a bug that is coming from the native code generator being too much
smart at optimizing list accesses. Looks like it's happening only when used
in conjonction with recursive loops. I fixed the implementation of
input_list ( as well as Enum.force which was using the same technique ).
Please update from the CVS.