Stdlib: better debug message in List.Bounded.insert

This commit is contained in:
Grégoire Henry 2019-02-19 16:27:22 +01:00
parent 14656a288b
commit 2e85409d25
No known key found for this signature in database
GPG Key ID: 50D984F20BD445D2

View File

@ -126,8 +126,13 @@ end = struct
if t.size < t.bound then begin
t.size <- t.size + 1 ;
t.data <- push x t.data
end else if E.compare (List.hd t.data) x < 0 then
t.data <- push x (List.tl t.data)
end else begin
match t.data with
| [] -> assert false
| hd :: tl ->
if E.compare hd x < 0 then
t.data <- push x tl
end
let get { data ; _ } = data