Commit a0ce5873 authored by David Bühler's avatar David Bühler

[Ival] Replaces Obj.truncate by Array.sub.

Fixes #613.
parent a8318b99
...@@ -154,11 +154,7 @@ let truncate_no_bottom r i = ...@@ -154,11 +154,7 @@ let truncate_no_bottom r i =
assert (i > 0); assert (i > 0);
if i = 1 if i = 1
then inject_singleton r.(0) then inject_singleton r.(0)
else begin else Array.sub r 0 i
(Obj.truncate (Obj.repr r) i);
assert (Array.length r = i);
r
end
let truncate_or_bottom r i = let truncate_or_bottom r i =
if i = 0 then `Bottom else `Value (truncate_no_bottom r i) if i = 0 then `Bottom else `Value (truncate_no_bottom r i)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment